platform/upstream/llvm.git
12 years agoSimplify the code using SmallVector::append(), as suggested by Benjamin Kramer.
Argyrios Kyrtzidis [Tue, 9 Oct 2012 20:08:43 +0000 (20:08 +0000)]
Simplify the code using SmallVector::append(), as suggested by Benjamin Kramer.

llvm-svn: 165538

12 years ago[driver] Remove redundant cases due to overlapping commits between Ted (r165531,...
Chad Rosier [Tue, 9 Oct 2012 20:01:58 +0000 (20:01 +0000)]
[driver] Remove redundant cases due to overlapping commits between Ted (r165531, 165532) and I
(r165534), but leave the test case in place.

llvm-svn: 165537

12 years ago-fcatch-undefined-behavior: emit calls to the runtime library whenever one of the...
Richard Smith [Tue, 9 Oct 2012 19:52:38 +0000 (19:52 +0000)]
-fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.

llvm-svn: 165536

12 years agoEnable response files in all tools. Patch by Liu, Yaxun (Sam). I have simplified
Rafael Espindola [Tue, 9 Oct 2012 19:52:10 +0000 (19:52 +0000)]
Enable response files in all tools. Patch by Liu, Yaxun (Sam). I have simplified
the test.

llvm-svn: 165535

12 years ago[driver] Remove the -W[no-][int-conversion|constant-conversion|enum-conversion]
Chad Rosier [Tue, 9 Oct 2012 19:43:33 +0000 (19:43 +0000)]
[driver] Remove the -W[no-][int-conversion|constant-conversion|enum-conversion]
options when clang invokes cc1plus for i386 kexts.
rdar://12459188

llvm-svn: 165534

12 years agoAdd a runtime diagnostics library for Clang's -fcatch-undefined-behavior.
Richard Smith [Tue, 9 Oct 2012 19:34:32 +0000 (19:34 +0000)]
Add a runtime diagnostics library for Clang's -fcatch-undefined-behavior.

llvm-svn: 165533

12 years agoDon't forward -Wenum-conversion to cc1plus.
Ted Kremenek [Tue, 9 Oct 2012 19:29:48 +0000 (19:29 +0000)]
Don't forward -Wenum-conversion to cc1plus.

llvm-svn: 165532

12 years agoDon't forward -Wint-conversion to cc1plus.
Ted Kremenek [Tue, 9 Oct 2012 19:29:46 +0000 (19:29 +0000)]
Don't forward -Wint-conversion to cc1plus.

llvm-svn: 165531

12 years agoMove the 'FunctionOnly' attributes thingy inside of the Attributes class.
Bill Wendling [Tue, 9 Oct 2012 19:01:18 +0000 (19:01 +0000)]
Move the 'FunctionOnly' attributes thingy inside of the Attributes class.

llvm-svn: 165530

12 years agoCreate variable for warning group -Wshorten-64-to-32.
Ted Kremenek [Tue, 9 Oct 2012 18:46:14 +0000 (18:46 +0000)]
Create variable for warning group -Wshorten-64-to-32.

llvm-svn: 165521

12 years agoPatch from Dan Malea to fix a build break I introduced yesterday.
Jason Molenda [Tue, 9 Oct 2012 18:40:44 +0000 (18:40 +0000)]
Patch from Dan Malea to fix a build break I introduced yesterday.
Thanks again Dan!

llvm-svn: 165519

12 years agoMove the functionality that looks for ObjC overridden methods from
Argyrios Kyrtzidis [Tue, 9 Oct 2012 18:19:01 +0000 (18:19 +0000)]
Move the functionality that looks for ObjC overridden methods from
ASTContext to the ObjCMethodDecl, and have the more generic
ASTContext::getOverriddenMethods() use the ObjCMethodDecl::getOverriddenMethods()
function.

llvm-svn: 165518

12 years agoNot everyone uses C++11, apparently
Douglas Gregor [Tue, 9 Oct 2012 17:51:56 +0000 (17:51 +0000)]
Not everyone uses C++11, apparently

llvm-svn: 165517

12 years agoChanges to clean up the runtime and how the ISA caches are managed.
Greg Clayton [Tue, 9 Oct 2012 17:51:53 +0000 (17:51 +0000)]
Changes to clean up the runtime and how the ISA caches are managed.

llvm-svn: 165516

12 years agoMake the order of visitation of the pending bodies in the AST reader
Douglas Gregor [Tue, 9 Oct 2012 17:50:23 +0000 (17:50 +0000)]
Make the order of visitation of the pending bodies in the AST reader
deterministic.

llvm-svn: 165515

12 years agoAllow MapVector clients to specify the map and vector types, and add a
Douglas Gregor [Tue, 9 Oct 2012 17:49:42 +0000 (17:49 +0000)]
Allow MapVector clients to specify the map and vector types, and add a
clear() method.

llvm-svn: 165514

12 years agoWhen we load a function or method body from an AST file, we check
Douglas Gregor [Tue, 9 Oct 2012 17:21:28 +0000 (17:21 +0000)]
When we load a function or method body from an AST file, we check
whether that function/method already has a body (loaded from some
other AST file), as introduced in r165137. Delay this check until
after the redeclaration chains have been wired up.

While I'm here, make the loading of method bodies lazy.

llvm-svn: 165513

12 years agoMore descriptive, doxygen-ed comments
Michael Ilseman [Tue, 9 Oct 2012 17:05:59 +0000 (17:05 +0000)]
More descriptive, doxygen-ed comments

llvm-svn: 165512

12 years agotblgen: Remove pointless method call.
Sean Silva [Tue, 9 Oct 2012 17:03:11 +0000 (17:03 +0000)]
tblgen: Remove pointless method call.

llvm-svn: 165511

12 years agoNew EarlyCSE tests for CSE-ing across commutativity.
Michael Ilseman [Tue, 9 Oct 2012 16:58:13 +0000 (16:58 +0000)]
New EarlyCSE tests for CSE-ing across commutativity.

llvm-svn: 165510

12 years agoUpdate EarlyCSE's SimpleValues to use Hashing.h for their hashes. Expanded the hashin...
Michael Ilseman [Tue, 9 Oct 2012 16:57:38 +0000 (16:57 +0000)]
Update EarlyCSE's SimpleValues to use Hashing.h for their hashes. Expanded the hashing and equality to allow for equality modulo commutativity for binary ops, and comparisons with swapping of predicates.

llvm-svn: 165509

12 years agoNew value_op_iterator for User. This allows other code to iterate over the User's...
Michael Ilseman [Tue, 9 Oct 2012 16:55:14 +0000 (16:55 +0000)]
New value_op_iterator for User. This allows other code to iterate over the User's operands directly as values, which can be convenient.

llvm-svn: 165508

12 years agoFixed the redo.py script to emit correct arch and compiler options after dotest.py...
Greg Clayton [Tue, 9 Oct 2012 16:54:55 +0000 (16:54 +0000)]
Fixed the redo.py script to emit correct arch and compiler options after dotest.py was switched over to use argparse.

llvm-svn: 165507

12 years agoImprovements to MIPS64 assembler:
David Chisnall [Tue, 9 Oct 2012 16:27:43 +0000 (16:27 +0000)]
Improvements to MIPS64 assembler:

- Teach it about dadd[i] instructions and move pseudo-instruction
- Make it parse the register names correctly (for N32 / N64)

llvm-svn: 165506

12 years agoAdd in the first step of the multiple pointer support. This adds in support to the...
Micah Villmow [Tue, 9 Oct 2012 16:06:12 +0000 (16:06 +0000)]
Add in the first step of the multiple pointer support. This adds in support to the data layout for specifying a per address space pointer size.
The next step is to update the optimizers to allow them to optimize the different address spaces with this information.

llvm-svn: 165505

12 years agoDetermine supported archs for compiler-rt libraries on Linux by trying to compile...
Alexey Samsonov [Tue, 9 Oct 2012 16:05:50 +0000 (16:05 +0000)]
Determine supported archs for compiler-rt libraries on Linux by trying to compile a simple executable

llvm-svn: 165504

12 years agoFixup for r165097: build 32-bit ASan compiler-rt library on 64-bit Linux only if...
Alexey Samsonov [Tue, 9 Oct 2012 16:03:52 +0000 (16:03 +0000)]
Fixup for r165097: build 32-bit ASan compiler-rt library on 64-bit Linux only if just-built clang can build simple 32-bit executables

llvm-svn: 165503

12 years agoIf a macro has been #undef'd in a precompiled header, we still need to
Douglas Gregor [Tue, 9 Oct 2012 16:01:50 +0000 (16:01 +0000)]
If a macro has been #undef'd in a precompiled header, we still need to
write out the macro history for that macro. Similarly, we need to cope
with reading a macro definition that has been #undef'd.

Take advantage of this new ability so that global code-completion
results can refer to #undef'd macros, rather than losing them
entirely. For multiply defined/#undef'd macros, we will still get the
wrong result, but it's better than getting no result.

llvm-svn: 165502

12 years agoClearing a SmallPtrSet is still expensive, split it out from OverloadCandidateSet...
Benjamin Kramer [Tue, 9 Oct 2012 15:52:25 +0000 (15:52 +0000)]
Clearing a SmallPtrSet is still expensive, split it out from OverloadCandidateSet::clear and don't do it on destruction.

llvm-svn: 165501

12 years agoFixup for r165490: Use DenseMap instead of std::map. Simplify the loop in CollectFunc...
Alexey Samsonov [Tue, 9 Oct 2012 10:34:52 +0000 (10:34 +0000)]
Fixup for r165490: Use DenseMap instead of std::map. Simplify the loop in CollectFunctionDIs.

llvm-svn: 165498

12 years agoMove the 'ParameterOnly' variable inside of the Attributes class and make it a method.
Bill Wendling [Tue, 9 Oct 2012 09:51:10 +0000 (09:51 +0000)]
Move the 'ParameterOnly' variable inside of the Attributes class and make it a method.

llvm-svn: 165497

12 years agoRemove the now dead VarArgsIncompatible variable.
Bill Wendling [Tue, 9 Oct 2012 09:33:01 +0000 (09:33 +0000)]
Remove the now dead VarArgsIncompatible variable.

llvm-svn: 165496

12 years agoUse the enum value of the attributes when removing them from the attributes builder.
Bill Wendling [Tue, 9 Oct 2012 09:17:28 +0000 (09:17 +0000)]
Use the enum value of the attributes when removing them from the attributes builder.

llvm-svn: 165495

12 years agoUse the enum value of the attributes when adding them to the attributes builder.
Bill Wendling [Tue, 9 Oct 2012 09:11:20 +0000 (09:11 +0000)]
Use the enum value of the attributes when adding them to the attributes builder.

llvm-svn: 165494

12 years ago[Sanitizer] Remove unneeded returns after UNIMPLEMENTED macro
Alexey Samsonov [Tue, 9 Oct 2012 08:51:08 +0000 (08:51 +0000)]
[Sanitizer] Remove unneeded returns after UNIMPLEMENTED macro

llvm-svn: 165493

12 years ago[Sanitizer] Add UNREACHABLE(msg) macro
Alexey Samsonov [Tue, 9 Oct 2012 08:42:07 +0000 (08:42 +0000)]
[Sanitizer] Add UNREACHABLE(msg) macro

llvm-svn: 165492

12 years agoFix PR14016.
Alexey Samsonov [Tue, 9 Oct 2012 08:13:15 +0000 (08:13 +0000)]
Fix PR14016.
DeadArgumentElimination pass can replace one LLVM function with another,
invalidating a pointer stored in debug info metadata entry for this function.
To fix this, we collect debug info descriptors for functions before
running a DeadArgumentElimination pass and "patch" pointers in metadata nodes
if we replace a function.

llvm-svn: 165490

12 years agoWe use the enums to query whether an Attributes object has that attribute. The
Bill Wendling [Tue, 9 Oct 2012 07:45:26 +0000 (07:45 +0000)]
We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

llvm-svn: 165489

12 years agoCreate enums for the different attributes.
Bill Wendling [Tue, 9 Oct 2012 07:45:08 +0000 (07:45 +0000)]
Create enums for the different attributes.

We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

llvm-svn: 165488

12 years agoCXXMethodDecl::isConst() and CXXMethodDecl::isVolatile() can be const methods
Arnaud A. de Grandmaison [Tue, 9 Oct 2012 07:09:56 +0000 (07:09 +0000)]
CXXMethodDecl::isConst() and CXXMethodDecl::isVolatile() can be const methods

Patch by: Laszlo Nagy

llvm-svn: 165486

12 years agoRemove some dead methods.
Bill Wendling [Tue, 9 Oct 2012 05:54:39 +0000 (05:54 +0000)]
Remove some dead methods.

llvm-svn: 165485

12 years agoRemove ifdef'd code.
Bill Wendling [Tue, 9 Oct 2012 05:36:15 +0000 (05:36 +0000)]
Remove ifdef'd code.

llvm-svn: 165484

12 years agoSeparate AVXCC and SSECC printing for cmpps/pd/ss/sd and add masking before the switc...
Craig Topper [Tue, 9 Oct 2012 05:26:13 +0000 (05:26 +0000)]
Separate AVXCC and SSECC printing for cmpps/pd/ss/sd and add masking before the switch statement. This keeps the unreachable default case from being hit if the instruction was created with an intrinsic with too large of an immediate.

llvm-svn: 165483

12 years agoRevert r117093, "test/Makefile: Force lit -j1 on Cygwin."
NAKAMURA Takumi [Tue, 9 Oct 2012 05:07:18 +0000 (05:07 +0000)]
Revert r117093, "test/Makefile: Force lit -j1 on Cygwin."

lit -jN works on cygwin in most cases, but still sometimes I can see stalls with iterative run on the buildbot.

llvm-svn: 165482

12 years agoTrivial change to the README, mainly to test commit access.
Sameer Sahasrabuddhe [Tue, 9 Oct 2012 04:59:42 +0000 (04:59 +0000)]
Trivial change to the README, mainly to test commit access.

llvm-svn: 165481

12 years agoIn parseMSRMaskOperand, add an explicit check for the operand being an identifier...
Craig Topper [Tue, 9 Oct 2012 04:55:28 +0000 (04:55 +0000)]
In parseMSRMaskOperand, add an explicit check for the operand being an identifier instead of just having an assert.

llvm-svn: 165480

12 years agoRemove some dead code from ARMAsmPrinter. Add virtual and LLVM_OVERRIDE to the other...
Craig Topper [Tue, 9 Oct 2012 04:23:49 +0000 (04:23 +0000)]
Remove some dead code from ARMAsmPrinter. Add virtual and LLVM_OVERRIDE to the other methods. Mark some of the helper methods as private.

llvm-svn: 165479

12 years agoRemove some unused code in the X86AsmPrinter. Add LLVM_OVERRIDE and virtual keywords...
Craig Topper [Tue, 9 Oct 2012 03:50:37 +0000 (03:50 +0000)]
Remove some unused code in the X86AsmPrinter. Add LLVM_OVERRIDE and virtual keywords to the remaining interface methods.

llvm-svn: 165478

12 years ago * Add relocation reference support for Hexagon and PowerPC.
Sid Manning [Tue, 9 Oct 2012 02:20:47 +0000 (02:20 +0000)]
  * Add relocation reference support for Hexagon and PowerPC.
    - Hexagon has many relocation types, this patch covers just
      a subset, more will be added.
    - PowerPC support was added so that we can verify mixed endian
      environments.
  * Add some basic test cases
  * Update ldd-core to accept -endian flag

llvm-svn: 165477

12 years agoFix PR14034, an infloop / heap corruption / crash bug in the new SROA.
Chandler Carruth [Tue, 9 Oct 2012 01:58:35 +0000 (01:58 +0000)]
Fix PR14034, an infloop / heap corruption / crash bug in the new SROA.
Thanks to Benjamin for the raw test case. This one took about 50 times
longer to reduce than to fix. =/

llvm-svn: 165476

12 years agowhitespace
Nadav Rotem [Tue, 9 Oct 2012 01:56:07 +0000 (01:56 +0000)]
whitespace

llvm-svn: 165475

12 years agoMove misplaced comment.
Sean Silva [Tue, 9 Oct 2012 01:47:16 +0000 (01:47 +0000)]
Move misplaced comment.

llvm-svn: 165474

12 years agoMove the logic that searches for overridden methods from libclang to
Argyrios Kyrtzidis [Tue, 9 Oct 2012 01:23:50 +0000 (01:23 +0000)]
Move the logic that searches for overridden methods from libclang to
ASTContext so that it can be widely available.

llvm-svn: 165473

12 years agoWhen storing the C++ overridden methods, store them once for the
Argyrios Kyrtzidis [Tue, 9 Oct 2012 01:23:45 +0000 (01:23 +0000)]
When storing the C++ overridden methods, store them once for the
canonical method; avoid storing them again for an out-of-line definition.

llvm-svn: 165472

12 years agoAdd a parameter to Symbols::DownloadObjectAndSymbolFile() to control
Jason Molenda [Tue, 9 Oct 2012 01:17:11 +0000 (01:17 +0000)]
Add a parameter to Symbols::DownloadObjectAndSymbolFile() to control
whether we try to call an external program to load symbols unconditionally,
or if we check the user's preferences before calling it.

ProcessMachCore now sets CanJIT to false - we can't execute code in a core file.

DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule changed
to load the kernel from an on-disk file if at all possible.
Don't load the kext binaries out of memory from the remote systems - their linkedit doesn't
seem to be in a good state and we'll error out down in SymbolVendorMacOSX if we try to use
the in-memory images.
Call Symbols::DownloadObjectAndSymbolFile to get the kext/kernel binary -- the external
program may be able to give us a file path on the local filesystem instead of reading
the binary / dSYM over a network drive every time.  Fall back to calling
Target::GetSharedModule() like before if DownloadObjectAndSymbolFile fails.

llvm-svn: 165471

12 years agoRemove a couple more 'hasAttrSomewhere' calls.
Bill Wendling [Tue, 9 Oct 2012 01:03:48 +0000 (01:03 +0000)]
Remove a couple more 'hasAttrSomewhere' calls.

llvm-svn: 165470

12 years agoFix. Apply the no capture attribute to the correct parameter.
Bill Wendling [Tue, 9 Oct 2012 00:51:40 +0000 (00:51 +0000)]
Fix. Apply the no capture attribute to the correct parameter.

llvm-svn: 165469

12 years agoConvert to using the Attributes::Builder class to create attributes.
Bill Wendling [Tue, 9 Oct 2012 00:47:36 +0000 (00:47 +0000)]
Convert to using the Attributes::Builder class to create attributes.

llvm-svn: 165468

12 years agoUse an iterator and proper query method instead of the 'hasAttrSomewhere' method.
Bill Wendling [Tue, 9 Oct 2012 00:34:19 +0000 (00:34 +0000)]
Use an iterator and proper query method instead of the 'hasAttrSomewhere' method.

llvm-svn: 165467

12 years agoRemove more uses of the attribute enums by supplying appropriate query methods for...
Bill Wendling [Tue, 9 Oct 2012 00:28:54 +0000 (00:28 +0000)]
Remove more uses of the attribute enums by supplying appropriate query methods for them.
No functionality change intended.

llvm-svn: 165466

12 years agoConvert to using the Attributes::Builder interface.
Bill Wendling [Tue, 9 Oct 2012 00:01:21 +0000 (00:01 +0000)]
Convert to using the Attributes::Builder interface.

llvm-svn: 165465

12 years agoFix typo in docs.
Eric Christopher [Mon, 8 Oct 2012 23:54:10 +0000 (23:54 +0000)]
Fix typo in docs.

llvm-svn: 165464

12 years agoFix up comment to be more clear.
Eric Christopher [Mon, 8 Oct 2012 23:53:45 +0000 (23:53 +0000)]
Fix up comment to be more clear.

llvm-svn: 165463

12 years agoMake sure we allow "#pragma options align=mac68k" in function-local contexts. <rdar...
Eli Friedman [Mon, 8 Oct 2012 23:52:38 +0000 (23:52 +0000)]
Make sure we allow "#pragma options align=mac68k" in function-local contexts.  <rdar://problem/12453134>

llvm-svn: 165462

12 years agoUpdate comment.
Bill Wendling [Mon, 8 Oct 2012 23:51:19 +0000 (23:51 +0000)]
Update comment.

llvm-svn: 165461

12 years agoFix a build warning and a dangerous possible crasher.
Greg Clayton [Mon, 8 Oct 2012 23:50:19 +0000 (23:50 +0000)]
Fix a build warning and a dangerous possible crasher.

llvm-svn: 165460

12 years agoAdd regression test to check if -Wenum-conversion is a subgroup of -Wconversion.
Ted Kremenek [Mon, 8 Oct 2012 23:45:09 +0000 (23:45 +0000)]
Add regression test to check if -Wenum-conversion is a subgroup of -Wconversion.

llvm-svn: 165459

12 years agoUse the Attributes::Builder to build the attributes in the parser.
Bill Wendling [Mon, 8 Oct 2012 23:27:46 +0000 (23:27 +0000)]
Use the Attributes::Builder to build the attributes in the parser.

llvm-svn: 165458

12 years agoUse DataTypes.h
Nadav Rotem [Mon, 8 Oct 2012 23:14:28 +0000 (23:14 +0000)]
Use DataTypes.h

llvm-svn: 165457

12 years agoIn VarDecl::getSourceRange() make sure to check that the source location
Argyrios Kyrtzidis [Mon, 8 Oct 2012 23:08:41 +0000 (23:08 +0000)]
In VarDecl::getSourceRange() make sure to check that the source location
of the initializer is valid before using it.

Fixes rdar://12455002&12449015 where local variables of objc objects in ARC mode
were not annotated because of the ImplicitValueInitExpr initializer having invalid
source range, resulting in the SourceRange of the VarDecl having invalid end location.

llvm-svn: 165456

12 years agoRefactor the AddrMode class out of TLI to its own header file.
Nadav Rotem [Mon, 8 Oct 2012 23:06:34 +0000 (23:06 +0000)]
Refactor the AddrMode class out of TLI to its own header file.
This class is used by LSR and a number of places in the codegen.
This is the first step in de-coupling LSR from TLI, and creating
a new interface in between them.

llvm-svn: 165455

12 years agoMake DebugMapModule destructor virtual since it inherits from Module.
Greg Clayton [Mon, 8 Oct 2012 22:48:57 +0000 (22:48 +0000)]
Make DebugMapModule destructor virtual since it inherits from Module.

llvm-svn: 165441

12 years agoActually add the -Wenum-conversion group to -Wconversion as r165361
Chandler Carruth [Mon, 8 Oct 2012 22:45:55 +0000 (22:45 +0000)]
Actually add the -Wenum-conversion group to -Wconversion as r165361
seems to have intended.

llvm-svn: 165440

12 years agoSort the subgroups of the diagnostic group for -Wconversion. No
Chandler Carruth [Mon, 8 Oct 2012 22:45:54 +0000 (22:45 +0000)]
Sort the subgroups of the diagnostic group for -Wconversion. No
functionality changed.

llvm-svn: 165439

12 years agoAdded a new "module" log channel which covers module creation, deletion, and common...
Greg Clayton [Mon, 8 Oct 2012 22:41:53 +0000 (22:41 +0000)]
Added a new "module" log channel which covers module creation, deletion, and common module list actions.

Also added a new option for "log enable" which is "--stack" which will print out a stack backtrace for each log line.

This was used to track down the leaking module issue I fixed last week.

llvm-svn: 165438

12 years agoChecking in fixes that I used to track down a leaking module. The heap module can...
Greg Clayton [Mon, 8 Oct 2012 22:39:38 +0000 (22:39 +0000)]
Checking in fixes that I used to track down a leaking module. The heap module can now search the vm regions with the --vm-regions options to any of the heap functions. This is currently slow and often will time out when run on a large program since our user expression timeout is set to 500000 usec. We need to add an API to LLDB where we can specify the timeout for an expression.

llvm-svn: 165437

12 years agoConvert the LLVM parser over to using the new Attributes::Builder to build its
Bill Wendling [Mon, 8 Oct 2012 22:20:14 +0000 (22:20 +0000)]
Convert the LLVM parser over to using the new Attributes::Builder to build its
attributes objects.

llvm-svn: 165436

12 years agoGive CaptureTracker::shouldExplore a base implementation. Most users want to do
Nick Lewycky [Mon, 8 Oct 2012 22:12:48 +0000 (22:12 +0000)]
Give CaptureTracker::shouldExplore a base implementation. Most users want to do
the same thing. No functionality change.

llvm-svn: 165435

12 years agoDon't crash on extra evil irreducible control flow.
Jakob Stoklund Olesen [Mon, 8 Oct 2012 22:06:44 +0000 (22:06 +0000)]
Don't crash on extra evil irreducible control flow.

When the CFG contains a loop with multiple entry blocks, the traces
computed by MachineTraceMetrics don't always have the same nice
properties. Loop back-edges are normally excluded from traces, but
MachineLoopInfo doesn't recognize loops with multiple entry blocks, so
those back-edges may be included.

Avoid asserting when that happens by adding an isEarlierInSameTrace()
function that accurately determines if a dominating block is part of the
same trace AND is above the currrent block in the trace.

llvm-svn: 165434

12 years agoBegin the transition to using the AttributesImpl object for the Attributes ivar.
Bill Wendling [Mon, 8 Oct 2012 21:47:17 +0000 (21:47 +0000)]
Begin the transition to using the AttributesImpl object for the Attributes ivar.

Start using the AttributesImpl object to hold the value of the attributes. All
queries go through the interfaces now.

This has one unfortunate consequence. I needed to move the AttributesImpl.h file
into include/llvm. But this is only temporary! Otherwise, the changes needed to
support this would be too large.

llvm-svn: 165433

12 years agoAdd names for the accelerator table sections so that they can
Eric Christopher [Mon, 8 Oct 2012 21:41:30 +0000 (21:41 +0000)]
Add names for the accelerator table sections so that they can
be emitted if they're wanted on elf platforms.

llvm-svn: 165432

12 years agoUpdate comment.
Eric Christopher [Mon, 8 Oct 2012 21:41:18 +0000 (21:41 +0000)]
Update comment.

llvm-svn: 165431

12 years agoMake Bitrig's clang understand -stdlib= correctly.
Chandler Carruth [Mon, 8 Oct 2012 21:31:38 +0000 (21:31 +0000)]
Make Bitrig's clang understand -stdlib= correctly.
With this patch Bitrig can use a different c++ library without pain and
within the normal commandline parameters.

Original patch by David Hill, with lots of fixes and cleanup by me.

llvm-svn: 165430

12 years agoUse a special path to place the .o files in.
Bill Wendling [Mon, 8 Oct 2012 21:17:59 +0000 (21:17 +0000)]
Use a special path to place the .o files in.

llvm-svn: 165429

12 years agoUse a special path to place the .o files in.
Bill Wendling [Mon, 8 Oct 2012 21:17:45 +0000 (21:17 +0000)]
Use a special path to place the .o files in.

llvm-svn: 165428

12 years agoFixup comment.
Eric Christopher [Mon, 8 Oct 2012 20:48:54 +0000 (20:48 +0000)]
Fixup comment.

llvm-svn: 165427

12 years agoFixup comments.
Eric Christopher [Mon, 8 Oct 2012 20:48:49 +0000 (20:48 +0000)]
Fixup comments.

llvm-svn: 165426

12 years agoCompilationDatabaseTest: Fix another Windows path issue.
Daniel Jasper [Mon, 8 Oct 2012 20:32:51 +0000 (20:32 +0000)]
CompilationDatabaseTest: Fix another Windows path issue.

llvm-svn: 165425

12 years agoCompilationDatabase: Use //net paths for tests, as they should be
Daniel Jasper [Mon, 8 Oct 2012 20:08:25 +0000 (20:08 +0000)]
CompilationDatabase: Use //net paths for tests, as they should be
considered absolute on all platforms.

llvm-svn: 165422

12 years ago<rdar://problem/12200505> Fixing a logical error in SBProcess, where the get_process_...
Enrico Granata [Mon, 8 Oct 2012 19:06:11 +0000 (19:06 +0000)]
<rdar://problem/12200505> Fixing a logical error in SBProcess, where the get_process_thread_list function was creating invalid threads_access instances, and hence failing to correctly fill in the list

llvm-svn: 165421

12 years agoSilly me! There was a closing ) missing from one of the lines - and Python complained...
Enrico Granata [Mon, 8 Oct 2012 19:01:10 +0000 (19:01 +0000)]
Silly me! There was a closing ) missing from one of the lines - and Python complained about syntax errors on the next line. It being a Friday afternoon made the rest

llvm-svn: 165420

12 years agoPR12716: PPC crashes on vector compare
Adhemerval Zanella [Mon, 8 Oct 2012 18:59:53 +0000 (18:59 +0000)]
PR12716: PPC crashes on vector compare

Vector compare using altivec 'vcmpxxx' instructions have as third argument
a vector register instead of CR one, different from integer and float-point
compares. This leads to a failure in code generation, where 'SelectSETCC'
expects a DAG with a CR register and gets vector register instead.

This patch changes the behavior by just returning a DAG with the
vector compare instruction based on the type. The patch also adds a testcase
for all vector types llvm defines.

It also included a fix on signed 5-bits predicates printing, where
signed values were not handled correctly as signed (char are unsigned by
default for PowerPC). This generates 'vspltisw' (vector splat)
instruction with SIM out of range.

llvm-svn: 165419

12 years agomisched: remove the unused getSpecialAddressLatency hook.
Andrew Trick [Mon, 8 Oct 2012 18:54:00 +0000 (18:54 +0000)]
misched: remove the unused getSpecialAddressLatency hook.

llvm-svn: 165418

12 years agomisched: remove forceUnitLatencies. Defaults are handled by the default SchedModel
Andrew Trick [Mon, 8 Oct 2012 18:53:57 +0000 (18:53 +0000)]
misched: remove forceUnitLatencies. Defaults are handled by the default SchedModel

llvm-svn: 165417

12 years agomisched: avoid scheduling an instruction twice.
Andrew Trick [Mon, 8 Oct 2012 18:53:53 +0000 (18:53 +0000)]
misched: avoid scheduling an instruction twice.

llvm-svn: 165416

12 years agoDon't emit double parentheses in __clang_version__.
Benjamin Kramer [Mon, 8 Oct 2012 18:49:39 +0000 (18:49 +0000)]
Don't emit double parentheses in __clang_version__.

PR14040.

llvm-svn: 165415

12 years agoHopefully appease Windows buildbot with Japanese (?) error message.
Daniel Jasper [Mon, 8 Oct 2012 18:37:21 +0000 (18:37 +0000)]
Hopefully appease Windows buildbot with Japanese (?) error message.

llvm-svn: 165414

12 years agoFileNameMatchTrie: Use StringRef instead of Twines where possible.
Daniel Jasper [Mon, 8 Oct 2012 18:31:54 +0000 (18:31 +0000)]
FileNameMatchTrie: Use StringRef instead of Twines where possible.

llvm-svn: 165412

12 years agoPowerPC: Fix object creation with PPC::MTCRF8 instruction
Adhemerval Zanella [Mon, 8 Oct 2012 18:25:11 +0000 (18:25 +0000)]
PowerPC: Fix object creation with PPC::MTCRF8 instruction

llvm-svn: 165411

12 years agoRetrying to apply Vishal's patch - hopefully this time it won't break Jason's build
Enrico Granata [Mon, 8 Oct 2012 17:32:55 +0000 (17:32 +0000)]
Retrying to apply Vishal's patch - hopefully this time it won't break Jason's build

llvm-svn: 165410