platform/upstream/llvm.git
11 years agoRemove divison-by-zero checks from -ftrapv. These checks were incompatible with
Richard Smith [Thu, 1 Nov 2012 22:13:39 +0000 (22:13 +0000)]
Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.

llvm-svn: 167258

11 years agoBBVectorize: Commit the rest of the test-case change.
Hal Finkel [Thu, 1 Nov 2012 21:57:27 +0000 (21:57 +0000)]
BBVectorize: Commit the rest of the test-case change.

llvm-svn: 167257

11 years agoBBVectorize: Use target costs for incoming and outgoing values instead of the depth...
Hal Finkel [Thu, 1 Nov 2012 21:50:12 +0000 (21:50 +0000)]
BBVectorize: Use target costs for incoming and outgoing values instead of the depth heuristic.

When target cost information is available, compute explicit costs of inserting and
extracting values from vectors. At this point, all costs are estimated using the
target information, and the chain-depth heuristic is not needed. As a result, it is now, by
default, disabled when using target costs.

llvm-svn: 167256

11 years agoRemove runtime tests from polly test suite
Tobias Grosser [Thu, 1 Nov 2012 21:44:59 +0000 (21:44 +0000)]
Remove runtime tests from polly test suite

Similar to LLVM we now follow the policy of only having LLVM-IR level tests in
the Polly test suite. Testing for miscompilation of larger programs should be
done with the llvm test suite.

llvm-svn: 167255

11 years agorename dylibNamesToOrdinal now that it is an ivar
Nick Kledzik [Thu, 1 Nov 2012 21:44:45 +0000 (21:44 +0000)]
rename dylibNamesToOrdinal now that it is an ivar

llvm-svn: 167254

11 years agoGet rid of hack by making the actual call public. This was causing the lldb-platform...
Greg Clayton [Thu, 1 Nov 2012 21:35:16 +0000 (21:35 +0000)]
Get rid of hack by making the actual call public. This was causing the lldb-platform to not be able to link.

llvm-svn: 167253

11 years agoFix the template type diffing to handle integral template arguments.
Richard Trieu [Thu, 1 Nov 2012 21:29:28 +0000 (21:29 +0000)]
Fix the template type diffing to handle integral template arguments.

llvm-svn: 167252

11 years agoDependences: Add support to calculate memory based dependences
Tobias Grosser [Thu, 1 Nov 2012 21:28:32 +0000 (21:28 +0000)]
Dependences: Add support to calculate memory based dependences

Instead of calculating exact value (flow) dependences, it is also possible to
calculate memory based dependences. Sometimes memory based dependences are a lot
easier to calculate. To evaluate the benefits, we add an option to calculate
memory based dependences (use -polly-value-dependences=false).

llvm-svn: 167251

11 years agoFixes to make the test suite work better when
Sean Callanan [Thu, 1 Nov 2012 21:23:21 +0000 (21:23 +0000)]
Fixes to make the test suite work better when
explicitly pointed at an LLDB framework and
executable.

llvm-svn: 167250

11 years agoSilence -Wformat on platforms where uint64_t is unsigned long.
Matt Beaumont-Gay [Thu, 1 Nov 2012 20:26:42 +0000 (20:26 +0000)]
Silence -Wformat on platforms where uint64_t is unsigned long.

llvm-svn: 167249

11 years agoFixed format string to avoid pointer truncation during 64-bit debugging.
Andrew Kaylor [Thu, 1 Nov 2012 19:49:21 +0000 (19:49 +0000)]
Fixed format string to avoid pointer truncation during 64-bit debugging.

llvm-svn: 167247

11 years ago[ELF] Fix -Woverloaded-virtual
Michael J. Spencer [Thu, 1 Nov 2012 19:46:19 +0000 (19:46 +0000)]
[ELF] Fix -Woverloaded-virtual

llvm-svn: 167246

11 years ago[MachO] Fix use after free.
Michael J. Spencer [Thu, 1 Nov 2012 19:46:06 +0000 (19:46 +0000)]
[MachO] Fix use after free.

llvm-svn: 167245

11 years ago[MachO] Fix uninitialized variables.
Michael J. Spencer [Thu, 1 Nov 2012 19:45:53 +0000 (19:45 +0000)]
[MachO] Fix uninitialized variables.

llvm-svn: 167244

11 years agoUse the relationship models infrastructure to add two relations - getPredOpcode
Pranav Bhandarkar [Thu, 1 Nov 2012 19:13:23 +0000 (19:13 +0000)]
Use the relationship models infrastructure to add two relations - getPredOpcode
and getPredNewOpcode. The first relates non predicated instructions with their
predicated forms and the second relates predicated instructions with their
predicate-new forms.

Patch by Jyotsna Verma!

llvm-svn: 167243

11 years agoMakefile patches from Charles Davis and Daniel Malea (+ one or two tweaks).
Filipe Cabecinhas [Thu, 1 Nov 2012 18:55:16 +0000 (18:55 +0000)]
Makefile patches from Charles Davis and Daniel Malea (+ one or two tweaks).

llvm-svn: 167242

11 years agoobjective-C block meta-data. This patch completes meta-data
Fariborz Jahanian [Thu, 1 Nov 2012 18:32:55 +0000 (18:32 +0000)]
objective-C block meta-data. This patch completes meta-data
generation for captured block variables in arc mode. This includes
inlined version of the meta-data when it can be done. It also includes
severat tests. This is wip. // rdar://12184410.

llvm-svn: 167241

11 years agoMake the FilenameRange of the InclusionDirective callback more accurate,
Argyrios Kyrtzidis [Thu, 1 Nov 2012 17:52:58 +0000 (17:52 +0000)]
Make the FilenameRange of the InclusionDirective callback more accurate,
preserve the macro location of the range end if the filename came from a macro.

Patch by Kim Gräsman!

llvm-svn: 167239

11 years agopeek should set eofbit if sgetc() returns eof.
Howard Hinnant [Thu, 1 Nov 2012 17:32:07 +0000 (17:32 +0000)]
peek should set eofbit if sgetc() returns eof.

llvm-svn: 167238

11 years agoAdd support for generating dwarf debugging info with assembly files
Kevin Enderby [Thu, 1 Nov 2012 17:31:35 +0000 (17:31 +0000)]
Add support for generating dwarf debugging info with assembly files
run through the 'C' preprocessor.  That is pick up the file name
and line numbers from the cpp hash file line comments for the
dwarf file and line numbers tables.

rdar://9275556

llvm-svn: 167237

11 years agoAvoid a crash when trying to parse a line table in the DWARF parser.
Greg Clayton [Thu, 1 Nov 2012 17:28:37 +0000 (17:28 +0000)]
Avoid a crash when trying to parse a line table in the DWARF parser.

llvm-svn: 167236

11 years agoScopDetection: Print line numbers of detected scops
Tobias Grosser [Thu, 1 Nov 2012 16:45:20 +0000 (16:45 +0000)]
ScopDetection: Print line numbers of detected scops

If the flags '-polly-report -g' are given, we print file name and line numbers
for the beginning and end of all detected scops.

  linear-algebra/kernels/gemm/gemm.c:23: Scop start
  linear-algebra/kernels/gemm/gemm.c:42: Scop end
  linear-algebra/kernels/gemm/gemm.c:77: Scop start
  linear-algebra/kernels/gemm/gemm.c:82: Scop end

llvm-svn: 167235

11 years agoRevert multiple adress space changes in Polly
Tobias Grosser [Thu, 1 Nov 2012 16:45:18 +0000 (16:45 +0000)]
Revert multiple adress space changes in Polly

llvm-svn: 167234

11 years agoRichard Smith: This fixes a problem in std::is_constructible for incomplete types...
Howard Hinnant [Thu, 1 Nov 2012 16:32:14 +0000 (16:32 +0000)]
Richard Smith:  This fixes a problem in std::is_constructible for incomplete types, and those types with a user-defined operator,().

llvm-svn: 167233

11 years agoFix an incorrect assert, the LHS can be an LValue.
Rafael Espindola [Thu, 1 Nov 2012 14:32:20 +0000 (14:32 +0000)]
Fix an incorrect assert, the LHS can be an LValue.

llvm-svn: 167232

11 years agollvm/test/lit.cfg: Don't use mcjit to ppc32 yet, not ready.
NAKAMURA Takumi [Thu, 1 Nov 2012 14:28:51 +0000 (14:28 +0000)]
llvm/test/lit.cfg: Don't use mcjit to ppc32 yet, not ready.

Unsupported CPU type!
UNREACHABLE executed at llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:553!

llvm-svn: 167231

11 years ago[asan] don't instrument globals that we've created ourselves (reduces the binary...
Kostya Serebryany [Thu, 1 Nov 2012 13:42:40 +0000 (13:42 +0000)]
[asan] don't instrument globals that we've created ourselves (reduces the binary size a bit)

llvm-svn: 167230

11 years agoAdd a getAddressSpace method to the GEP instruction to mirror that of
Chandler Carruth [Thu, 1 Nov 2012 11:25:55 +0000 (11:25 +0000)]
Add a getAddressSpace method to the GEP instruction to mirror that of
the inttoptr instruction. The conceptual model here is that
'getAddressSpace' refers to the address space of this instruction's
type. It just happens that for GEPs, that is always the same as the
pointer operand's address space. We want both names so that access
patterns can be consistent between different instruction types.

llvm-svn: 167229

11 years agoAdd some consistent doxygen comments for the address space helpers.
Chandler Carruth [Thu, 1 Nov 2012 11:25:28 +0000 (11:25 +0000)]
Add some consistent doxygen comments for the address space helpers.
These clarify that the methods called 'getPointerAddressSpace' apply to
the pointer *operand* of the instruction.

llvm-svn: 167228

11 years agoNormalize the API and doxygen comments for the ptrtoint instruction.
Chandler Carruth [Thu, 1 Nov 2012 11:16:47 +0000 (11:16 +0000)]
Normalize the API and doxygen comments for the ptrtoint instruction.

llvm-svn: 167227

11 years agoRemove a weird static helper from the GEP instruction and just directly
Chandler Carruth [Thu, 1 Nov 2012 10:59:30 +0000 (10:59 +0000)]
Remove a weird static helper from the GEP instruction and just directly
compute the address space in the one place it was used.

Also write the getPointerAddressSpace member in terms of the
getPointerOperandType member.

llvm-svn: 167226

11 years agoAs I'm going to be touching several comments in this file, update the
Chandler Carruth [Thu, 1 Nov 2012 10:46:54 +0000 (10:46 +0000)]
As I'm going to be touching several comments in this file, update the
'@brief' doxygen markup to the now standard '\brief' markup form, in
conformance with the coding standards. This will let me continue to
write new comments in this form without making things inconsistent.

llvm-svn: 167225

11 years agoAdd a test case for PR14233.
Chandler Carruth [Thu, 1 Nov 2012 10:26:36 +0000 (10:26 +0000)]
Add a test case for PR14233.

llvm-svn: 167224

11 years agoTeach Type::getPointerAddressSpace to look through pointer vectors
Chandler Carruth [Thu, 1 Nov 2012 09:37:49 +0000 (09:37 +0000)]
Teach Type::getPointerAddressSpace to look through pointer vectors
politely and document this feature.

This simple API extension then allows us to write all of the
Instructions' address space query methods much more simply. No
functionality change intended here.

llvm-svn: 167223

11 years agoRevert the majority of the next patch in the address space series:
Chandler Carruth [Thu, 1 Nov 2012 09:14:31 +0000 (09:14 +0000)]
Revert the majority of the next patch in the address space series:

r165941: Resubmit the changes to llvm core to update the functions to
         support different pointer sizes on a per address space basis.

Despite this commit log, this change primarily changed stuff outside of
VMCore, and those changes do not carry any tests for correctness (or
even plausibility), and we have consistently found questionable or flat
out incorrect cases in these changes. Most of them are probably correct,
but we need to devise a system that makes it more clear when we have
handled the address space concerns correctly, and ideally each pass that
gets updated would receive an accompanying test case that exercises that
pass specificaly w.r.t. alternate address spaces.

However, from this commit, I have retained the new C API entry points.
Those were an orthogonal change that probably should have been split
apart, but they seem entirely good.

In several places the changes were very obvious cleanups with no actual
multiple address space code added; these I have not reverted when
I spotted them.

In a few other places there were merge conflicts due to a cleaner
solution being implemented later, often not using address spaces at all.
In those cases, I've preserved the new code which isn't address space
dependent.

This is part of my ongoing effort to clean out the partial address space
code which carries high risk and low test coverage, and not likely to be
finished before the 3.2 release looms closer. Duncan and I would both
like to see the above issues addressed before we return to these
changes.

llvm-svn: 167222

11 years agoRevert the series of commits starting with r166578 which introduced the
Chandler Carruth [Thu, 1 Nov 2012 08:07:29 +0000 (08:07 +0000)]
Revert the series of commits starting with r166578 which introduced the
getIntPtrType support for multiple address spaces via a pointer type,
and also introduced a crasher bug in the constant folder reported in
PR14233.

These commits also contained several problems that should really be
addressed before they are re-committed. I have avoided reverting various
cleanups to the DataLayout APIs that are reasonable to have moving
forward in order to reduce the amount of churn, and minimize the number
of commits that were reverted. I've also manually updated merge
conflicts and manually arranged for the getIntPtrType function to stay
in DataLayout and to be defined in a plausible way after this revert.

Thanks to Duncan for working through this exact strategy with me, and
Nick Lewycky for tracking down the really annoying crasher this
triggered. (Test case to follow in its own commit.)

After discussing with Duncan extensively, and based on a note from
Micah, I'm going to continue to back out some more of the more
problematic patches in this series in order to ensure we go into the
LLVM 3.2 branch with a reasonable story here. I'll send a note to
llvmdev explaining what's going on and why.

Summary of reverted revisions:

r166634: Fix a compiler warning with an unused variable.
r166607: Add some cleanup to the DataLayout changes requested by
         Chandler.
r166596: Revert "Back out r166591, not sure why this made it through
         since I cancelled the command. Bleh, sorry about this!
r166591: Delete a directory that wasn't supposed to be checked in yet.
r166578: Add in support for getIntPtrType to get the pointer type based
         on the address space.
llvm-svn: 167221

11 years ago-fcatch-undefined-behavior: Start checking loads and stores for null pointers.
Richard Smith [Thu, 1 Nov 2012 07:22:08 +0000 (07:22 +0000)]
-fcatch-undefined-behavior: Start checking loads and stores for null pointers.
We want the diagnostic, and if the load is optimized away, we still want to
trap it. Stop checking non-default address spaces; that doesn't work in
general.

llvm-svn: 167219

11 years agoBBVectorize: Account for internal shuffle costs
Hal Finkel [Thu, 1 Nov 2012 06:26:34 +0000 (06:26 +0000)]
BBVectorize: Account for internal shuffle costs

When target costs are available, use them to account for the costs of
shuffles on internal edges of the DAG of candidate pairs.

Because the shuffle costs here are currently for only the internal edges,
the current target cost model is trivial, and the chain depth requirement
is still in place, I don't yet have an easy test
case. Nevertheless, by looking at the debug output, it does seem to do the right
think to the effective "size" of each DAG of candidate pairs.

llvm-svn: 167217

11 years ago[clang.py] Add Cursor.get_arguments()
Gregory Szorc [Thu, 1 Nov 2012 05:46:30 +0000 (05:46 +0000)]
[clang.py] Add Cursor.get_arguments()

Patch provided by Matthias Kleine <matthias_kleine@gmx.de>

llvm-svn: 167216

11 years agoCodegen: Selectively copy in array addresses for OpenMP code
Tobias Grosser [Thu, 1 Nov 2012 05:34:55 +0000 (05:34 +0000)]
Codegen: Selectively copy in array addresses for OpenMP code

The detection of values that need to be copied in to the generated OpenMP
subfunction also detects the array base addresses needed in the SCoP. Hence, it
is not necessary to unconditionally copy all the base addresses to the generated
function.

Test cases are modified to reflect this change. Arrays which are global
variables do not occur in the struct passed to the subfunction anymore. A test
case for base address copy-in is added in copy_in_array.{c,ll}.

Committed with slight modifications

Contributed by:  Armin Groesslinger <armin.groesslinger@uni-passau.de>

llvm-svn: 167215

11 years agoCodeGen: Add scop-parameters to the OpenMP context
Tobias Grosser [Thu, 1 Nov 2012 05:34:48 +0000 (05:34 +0000)]
CodeGen: Add scop-parameters to the OpenMP context

In addition to the arrays and clast variables a SCoP statement may also refer to
values defined before the SCoP or to function arguments. Detect these values and
add them to the set of values passed to the function generated for OpenMP
parallel execution of a clast.

Committed with additional test cases and some refactoring.

Contributed by:  Armin Groesslinger  <armin.groesslinger@uni-passau.de>

llvm-svn: 167214

11 years agoCodegen: Copy and restore the ValueMap and ClastVars explicitly
Tobias Grosser [Thu, 1 Nov 2012 05:34:35 +0000 (05:34 +0000)]
Codegen: Copy and restore the ValueMap and ClastVars explicitly

When generating OpenMP or GPGPU code the original ValueMap and ClastVars must be
kept. We already recovered the original ClastVars by reverting the changes, but
we did not keep the content of the ValueMap. This patch keeps now an explicit
copy of both maps and restores them after generating OpenMP or GPGPU code.

This is an adapted version of a patch contributed by:
Armin Groesslinger  <armin.groesslinger@uni-passau.de>

llvm-svn: 167213

11 years agoRemove first argument from Arg::getValue; it's been unused since r105760.
Richard Smith [Thu, 1 Nov 2012 04:30:05 +0000 (04:30 +0000)]
Remove first argument from Arg::getValue; it's been unused since r105760.

llvm-svn: 167211

11 years agoRemove CompilerInvocation::toArgs and clang -cc1test mode. These were untested
Richard Smith [Thu, 1 Nov 2012 03:48:49 +0000 (03:48 +0000)]
Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untested
and apparently unused (and since they are untested, they're presumably also
broken).

llvm-svn: 167210

11 years agoCleanup another place redundant SP maintained
Michael Liao [Thu, 1 Nov 2012 03:47:50 +0000 (03:47 +0000)]
Cleanup another place redundant SP maintained

llvm-svn: 167209

11 years ago[CMake] Add llvm-mcmarkup to check-llvm.
NAKAMURA Takumi [Thu, 1 Nov 2012 02:13:50 +0000 (02:13 +0000)]
[CMake] Add llvm-mcmarkup to check-llvm.

llvm-svn: 167208

11 years agotest/CodeGen/X86/fp-fast.ll: Add +avx.
NAKAMURA Takumi [Thu, 1 Nov 2012 02:13:45 +0000 (02:13 +0000)]
test/CodeGen/X86/fp-fast.ll: Add +avx.

llvm-svn: 167207

11 years agoFix an error message in debugserver so it doesn't print "Unable to
Jason Molenda [Thu, 1 Nov 2012 02:02:59 +0000 (02:02 +0000)]
Fix an error message in debugserver so it doesn't print "Unable to
launch process (null)" because we changed argv while doing argument
parsing.

llvm-svn: 167202

11 years ago[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
Argyrios Kyrtzidis [Thu, 1 Nov 2012 02:01:34 +0000 (02:01 +0000)]
[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
the receiver of an ObjC message expression.

rdar://12578643

llvm-svn: 167201

11 years agoAdd a few more simple fast-math constant propagations and cancellations.
Owen Anderson [Thu, 1 Nov 2012 02:00:53 +0000 (02:00 +0000)]
Add a few more simple fast-math constant propagations and cancellations.

llvm-svn: 167200

11 years agoclang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h: Appease...
NAKAMURA Takumi [Thu, 1 Nov 2012 01:47:02 +0000 (01:47 +0000)]
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h: Appease msvc.

llvm-svn: 167199

11 years agoExploit the new identity composition in composeSubRegIndices().
Jakob Stoklund Olesen [Thu, 1 Nov 2012 01:15:43 +0000 (01:15 +0000)]
Exploit the new identity composition in composeSubRegIndices().

The static compose() function in RegisterCoalescer was doing the exact
same thing.

llvm-svn: 167198

11 years agoThere seems to be some odd corner case where we shut down the ProcessGDBRemote, but...
Jim Ingham [Thu, 1 Nov 2012 01:15:33 +0000 (01:15 +0000)]
There seems to be some odd corner case where we shut down the ProcessGDBRemote, but we haven't managed to shut down the async thread.  That causes the ProcessGDBRemote::AsyncThread to crash when it wakes up.  So I changed StartAsyncThread and StopAsyncThread to be callable multiple times (only the first one does anything) so that we can just shut it down unequivocally in the ProcessGDBRemote destructor.

<rdar://problem/12602981>

llvm-svn: 167197

11 years agoDon't insert and erase load instruction. Simply create (new) and delete it.
Jakub Staszak [Thu, 1 Nov 2012 01:10:43 +0000 (01:10 +0000)]
Don't insert and erase load instruction. Simply create (new) and delete it.

llvm-svn: 167196

11 years ago[analyzer] Optimize assumeDual by assuming constraint managers are consistent.
Jordan Rose [Thu, 1 Nov 2012 01:05:39 +0000 (01:05 +0000)]
[analyzer] Optimize assumeDual by assuming constraint managers are consistent.

Specifically, if adding a constraint makes the current system infeasible,
assume the constraint is false, instead of attempting to add its negation.

In +Asserts builds we will still assert that at least one state is feasible.

Patch by Ryan Govostes!

llvm-svn: 167195

11 years agoSwitch from using KERN_PROCARGS2 to get the path to the executed process to proc_pidp...
Jim Ingham [Thu, 1 Nov 2012 01:04:46 +0000 (01:04 +0000)]
Switch from using KERN_PROCARGS2 to get the path to the executed process to proc_pidpath.  The former was flakey, and the whole point of libproc is to protect us from potential flakiness at that level...

<rdar://problem/12594781>

llvm-svn: 167194

11 years ago[lit] For the "case-insensitive-filesystem" make sure to create the test temporary...
Argyrios Kyrtzidis [Thu, 1 Nov 2012 00:59:15 +0000 (00:59 +0000)]
[lit] For the "case-insensitive-filesystem" make sure to create the test temporary file
in the test output directory.

llvm-svn: 167193

11 years agoStreamlined memory manager hierarchy for MCJIT and RuntimeDyld.
Andrew Kaylor [Thu, 1 Nov 2012 00:46:04 +0000 (00:46 +0000)]
Streamlined memory manager hierarchy for MCJIT and RuntimeDyld.

Patch by Ashok Thirumurthi

llvm-svn: 167192

11 years ago[Support] Fix StrError on Windows to actually return the error string...
Michael J. Spencer [Thu, 1 Nov 2012 00:34:09 +0000 (00:34 +0000)]
[Support] Fix StrError on Windows to actually return the error string...

llvm-svn: 167191

11 years agoGenerate a table-driven version of TRI::composeSubRegIndices().
Jakob Stoklund Olesen [Thu, 1 Nov 2012 00:32:10 +0000 (00:32 +0000)]
Generate a table-driven version of TRI::composeSubRegIndices().

Explicitly allow composition of null sub-register indices, and handle
that common case in an inlinable stub.

Use a compressed table implementation instead of the previous nested
switches which generated pretty bad code.

llvm-svn: 167190

11 years ago[analyzer] Fix typo in r167186.
Jordan Rose [Thu, 1 Nov 2012 00:25:15 +0000 (00:25 +0000)]
[analyzer] Fix typo in r167186.

llvm-svn: 167189

11 years agoclang/test/Index/code-completion-skip-bodies.cpp: Add XFAIL while investigating.
NAKAMURA Takumi [Thu, 1 Nov 2012 00:20:00 +0000 (00:20 +0000)]
clang/test/Index/code-completion-skip-bodies.cpp: Add XFAIL while investigating.

llvm-svn: 167188

11 years ago[analyzer] Minor cleanup in SimpleStreamChecker's class definition.
Jordan Rose [Thu, 1 Nov 2012 00:18:41 +0000 (00:18 +0000)]
[analyzer] Minor cleanup in SimpleStreamChecker's class definition.

No functionality change.

llvm-svn: 167187

11 years ago[analyzer] Rename ConditionTruthVal::isTrue to isConstrainedTrue.
Jordan Rose [Thu, 1 Nov 2012 00:18:27 +0000 (00:18 +0000)]
[analyzer] Rename ConditionTruthVal::isTrue to isConstrainedTrue.

(and the same for isFalse)

No functionality change.

llvm-svn: 167186

11 years agoFixed format strings to avoid pointer truncation during 64-bit debugging.
Andrew Kaylor [Thu, 1 Nov 2012 00:17:11 +0000 (00:17 +0000)]
Fixed format strings to avoid pointer truncation during 64-bit debugging.

llvm-svn: 167185

11 years agoCorrectly reject gotos in function-level try blocks. PR14225.
Eli Friedman [Wed, 31 Oct 2012 23:55:28 +0000 (23:55 +0000)]
Correctly reject gotos in function-level try blocks.  PR14225.

llvm-svn: 167184

11 years agoAdded the plists to the debugserver project and fixed the labels for the new plists.
Greg Clayton [Wed, 31 Oct 2012 23:49:14 +0000 (23:49 +0000)]
Added the plists to the debugserver project and fixed the labels for the new plists.

llvm-svn: 167183

11 years agoMore launchd style plists.
Greg Clayton [Wed, 31 Oct 2012 23:43:37 +0000 (23:43 +0000)]
More launchd style plists.

llvm-svn: 167182

11 years agoMC: Simple example parser for MC assembly markup.
Jim Grosbach [Wed, 31 Oct 2012 23:24:13 +0000 (23:24 +0000)]
MC: Simple example parser for MC assembly markup.

Nothing fancy, just a simple demonstration parser.

llvm-svn: 167181

11 years ago(For X86) Enhancement to add-carray/sub-borrow (adc/sbb) optimization.
Shuxin Yang [Wed, 31 Oct 2012 23:11:48 +0000 (23:11 +0000)]
(For X86) Enhancement to add-carray/sub-borrow (adc/sbb) optimization.

  The adc/sbb optimization is to able to convert following expression
into a single adc/sbb instruction:
  (ult) ... = x + 1 // where the ult is unsigned-less-than comparison
  (ult) ... = x - 1

  This change is to flip the "x >u y" (i.e. ugt comparison) in order
to expose the adc/sbb opportunity.

llvm-svn: 167180

11 years agoUse libxml2 on Mac OS X.
Filipe Cabecinhas [Wed, 31 Oct 2012 23:02:00 +0000 (23:02 +0000)]
Use libxml2 on Mac OS X.

llvm-svn: 167179

11 years ago[analyzer] Fix a bug in SimpleStreamChecker - return after sink.
Anna Zaks [Wed, 31 Oct 2012 22:17:48 +0000 (22:17 +0000)]
[analyzer] Fix a bug in SimpleStreamChecker - return after sink.

Thanks Ted.

llvm-svn: 167176

11 years agoResolve any bundle paths we are given when the specified executable is a bundle.
Greg Clayton [Wed, 31 Oct 2012 21:44:39 +0000 (21:44 +0000)]
Resolve any bundle paths we are given when the specified executable is a bundle.

llvm-svn: 167175

11 years agoLoopVectorize: Preserve NSW, NUW and IsExact flags.
Nadav Rotem [Wed, 31 Oct 2012 21:40:39 +0000 (21:40 +0000)]
LoopVectorize: Preserve NSW, NUW and IsExact flags.

llvm-svn: 167174

11 years ago[driver] Remove an extra space with the -iprefix option, so that
Chad Rosier [Wed, 31 Oct 2012 21:08:30 +0000 (21:08 +0000)]
[driver] Remove an extra space with the -iprefix option, so that
matching works correctly.
Part of rdar://12329974

llvm-svn: 167173

11 years ago[PCH] Remove the stat cache from the PCH file.
Argyrios Kyrtzidis [Wed, 31 Oct 2012 20:59:50 +0000 (20:59 +0000)]
[PCH] Remove the stat cache from the PCH file.

The stat cache became essentially useless ever since we started
validating all file entries in the PCH.
But the motivating reason for removing it now is that it also affected
correctness in this situation:

-You have a header without include guards (using "#pragma once" or #import)
-When creating the PCH:
  -The same header is referenced in an #include with different filename cases.
  -In the PCH, of course, we record only one file entry for the header file
  -But we cache in the PCH file the stat info for both filename cases

-Then the source files are updated and the header file is updated in a way that
 its size and modification time are the same but its inode changes

-When using the PCH:
  -We validate the headers, we check that header file and we create a file entry with its current inode
  -There's another #include with a filename with different case than the previously created file entry
  -In order to get its stat info we go through the cached stat info of the PCH and we receive the old inode
  -because of the different inodes, we think they are different files so we go ahead and include its contents.

Removing the stat cache will potentially break clients that are attempting to use the stat cache
as a way of avoiding having the actual input files available. If that use case is important, patches are welcome
to bring it back in a way that will actually work correctly (i.e., emit a PCH that is self-contained, coping with
literal strings, line/column computations, etc.).

This fixes rdar://5502805

llvm-svn: 167172

11 years agoMore fixes from MSVC warnings found by Carlo Kok.
Greg Clayton [Wed, 31 Oct 2012 20:56:43 +0000 (20:56 +0000)]
More fixes from MSVC warnings found by Carlo Kok.

llvm-svn: 167171

11 years agoFix a bug in the cost calculation of vector casts. Detect situations where bitcasts...
Nadav Rotem [Wed, 31 Oct 2012 20:52:26 +0000 (20:52 +0000)]
Fix a bug in the cost calculation of vector casts. Detect situations where bitcasts cost zero.

llvm-svn: 167170

11 years agoCarlo Kok was compiling with MSVC, caught some more issues.
Greg Clayton [Wed, 31 Oct 2012 20:51:31 +0000 (20:51 +0000)]
Carlo Kok was compiling with MSVC, caught some more issues.

llvm-svn: 167168

11 years agoCarlo Kok found an issue where default parameters were causing the wrong argument...
Greg Clayton [Wed, 31 Oct 2012 20:49:04 +0000 (20:49 +0000)]
Carlo Kok found an issue where default parameters were causing the wrong argument to be passed. I got rid of the default args so we don't run into this.

llvm-svn: 167167

11 years agoFix cl brokeness.
Michael J. Spencer [Wed, 31 Oct 2012 20:47:30 +0000 (20:47 +0000)]
Fix cl brokeness.

cl is not attempting to complete a templated class when used in this
context. The conversion forces this to happen.

Thanks to Richard Smith for figuring this out.

llvm-svn: 167166

11 years agoAdd missing include.
Michael J. Spencer [Wed, 31 Oct 2012 20:47:11 +0000 (20:47 +0000)]
Add missing include.

llvm-svn: 167165

11 years agoMark code, not data, as executable in lli RemoteTarget simulator.
Andrew Kaylor [Wed, 31 Oct 2012 20:37:14 +0000 (20:37 +0000)]
Mark code, not data, as executable in lli RemoteTarget simulator.

llvm-svn: 167164

11 years ago[clang tests] Added require ppc64-registered-target to Headers/altivec-header.c to...
Michael Gottesman [Wed, 31 Oct 2012 20:20:04 +0000 (20:20 +0000)]
[clang tests] Added require ppc64-registered-target to Headers/altivec-header.c to ensure it only runs on ppc64.

llvm-svn: 167162

11 years ago[driver] Remove an extra space with the -internal-externc-isystem option, so
Chad Rosier [Wed, 31 Oct 2012 19:28:55 +0000 (19:28 +0000)]
[driver] Remove an extra space with the -internal-externc-isystem option, so
that matching works correctly.
Part of rdar://12329974

llvm-svn: 167161

11 years agoPatch for issue found by Carlo Kok. Fixed a type issue where an ';' was incorrectly...
Greg Clayton [Wed, 31 Oct 2012 19:05:35 +0000 (19:05 +0000)]
Patch for issue found by Carlo Kok. Fixed a type issue where an ';' was incorrectly following an if statement. There actually isn't a need for the if statement, so it was removed.

llvm-svn: 167160

11 years agoARM AAPCS-VFP: fix tracking of allocated VFP registers.
Manman Ren [Wed, 31 Oct 2012 19:02:26 +0000 (19:02 +0000)]
ARM AAPCS-VFP: fix tracking of allocated VFP registers.

According to the spec, we can backfill VFP registers that were skipped due
to alignment constraints.

llvm-svn: 167159

11 years ago[driver] Remove the -ccc-host-triple alias. This has been replaced by the
Chad Rosier [Wed, 31 Oct 2012 18:59:38 +0000 (18:59 +0000)]
[driver] Remove the -ccc-host-triple alias.  This has been replaced by the
-target option.
rdar://10692880

llvm-svn: 167158

11 years agoRemove Triple::getArchTypeForDarwinArchName. I lives on the clang driver now.
Rafael Espindola [Wed, 31 Oct 2012 18:52:25 +0000 (18:52 +0000)]
Remove Triple::getArchTypeForDarwinArchName. I lives on the clang driver now.

llvm-svn: 167157

11 years agogetArchTypeForDarwinArchName is only used in the clang driver, copy it there.
Rafael Espindola [Wed, 31 Oct 2012 18:51:07 +0000 (18:51 +0000)]
getArchTypeForDarwinArchName is only used in the clang driver, copy it there.
I will remove it from llvm in the next commit.

llvm-svn: 167156

11 years agoFix for -ast-dump-filter
Alexander Kornienko [Wed, 31 Oct 2012 18:46:31 +0000 (18:46 +0000)]
Fix for -ast-dump-filter

Summary:
-ast-dump-filter implementation used to stop AST traversal after traversing a NULL Decl node.

Added test and fixed.

Reviewers: djasper, klimek, rsmith

Reviewed By: djasper

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D93

llvm-svn: 167155

11 years ago[mips] Set isAsCheapAsAMove flag on ADDiu and DADDiu, which enables
Akira Hatanaka [Wed, 31 Oct 2012 18:37:55 +0000 (18:37 +0000)]
[mips] Set isAsCheapAsAMove flag on ADDiu and DADDiu, which enables
re-materialization of immediate loads.

llvm-svn: 167153

11 years ago[driver] Completely rework how superfluous options are stripped out of the crash
Chad Rosier [Wed, 31 Oct 2012 18:31:33 +0000 (18:31 +0000)]
[driver] Completely rework how superfluous options are stripped out of the crash
diagnostics script.

This addresses the FIXME pertaining to quoted arguments.  We also delineate
between those flags that have an argument (e.g., -D macro, -MF file) and
those that do not (e.g., -M, -MM, -MG).  Finally, we add the -dwarf-debug-flags
to the list of flags to be removed.
rdar://12329974

llvm-svn: 167152

11 years agoAdd "static" to some functions in altivec.c where it was missing.
Ulrich Weigand [Wed, 31 Oct 2012 18:17:07 +0000 (18:17 +0000)]
Add "static" to some functions in altivec.c where it was missing.

llvm-svn: 167148

11 years agoMCJIT unit test: add calls to ensure that instruction caches are properly invalidated...
Amara Emerson [Wed, 31 Oct 2012 17:44:16 +0000 (17:44 +0000)]
MCJIT unit test: add calls to ensure that instruction caches are properly invalidated before code execution.

llvm-svn: 167146

11 years agoPort lli bug fix from r166920 to MCJIT unit test.
Amara Emerson [Wed, 31 Oct 2012 17:41:51 +0000 (17:41 +0000)]
Port lli bug fix from r166920 to MCJIT unit test.

llvm-svn: 167145

11 years agoCommit access test.
Amara Emerson [Wed, 31 Oct 2012 17:35:12 +0000 (17:35 +0000)]
Commit access test.

llvm-svn: 167144

11 years agoThis patch removes the XFAIL for powerpc for
Bill Schmidt [Wed, 31 Oct 2012 17:31:46 +0000 (17:31 +0000)]
This patch removes the XFAIL for powerpc for
test/CodeGenCXX/member-alignment.cpp.  The test succeeds for
powerpc64-unknown-linux-gnu.  If other flavors of powerpc are
shown by buildbots to still be broken, we can adjust the test
at that time.

llvm-svn: 167143

11 years agoIf skipping bodies is enabled outside code-completion, just skip the body directly
Argyrios Kyrtzidis [Wed, 31 Oct 2012 17:29:28 +0000 (17:29 +0000)]
If skipping bodies is enabled outside code-completion, just skip the body directly
without using tentative parsing.

llvm-svn: 167142

11 years agoDecouple code-completion for the SkipFunctionBodies frontend option and
Argyrios Kyrtzidis [Wed, 31 Oct 2012 17:29:22 +0000 (17:29 +0000)]
Decouple code-completion for the SkipFunctionBodies frontend option and
add a test to make sure code-completion skips bodies.

llvm-svn: 167141