oota-llvm.git
13 years agoDon't include information about the build into the information returned by
Rafael Espindola [Tue, 17 May 2011 15:26:34 +0000 (15:26 +0000)]
Don't include information about the build into the information returned by
getHostTriple. This fixes a 32 bit clang running on a 64 bit ubuntu.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131463 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a bug in PerformEXTRACT_VECTOR_ELTCombine. The code created an ADD SDNode
Nadav Rotem [Tue, 17 May 2011 08:31:57 +0000 (08:31 +0000)]
Fix a bug in PerformEXTRACT_VECTOR_ELTCombine. The code created an ADD SDNode
with two different types, in cases where the index and the ptr had different
types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131461 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate comment.
Eric Christopher [Tue, 17 May 2011 08:16:14 +0000 (08:16 +0000)]
Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131459 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSupport XOR and AND optimization with no return value.
Eric Christopher [Tue, 17 May 2011 08:10:18 +0000 (08:10 +0000)]
Support XOR and AND optimization with no return value.

Finishes off rdar://8470697

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131458 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCouple less magic numbers.
Eric Christopher [Tue, 17 May 2011 07:50:41 +0000 (07:50 +0000)]
Couple less magic numbers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131457 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake this code a little less magic number laden.
Eric Christopher [Tue, 17 May 2011 07:47:55 +0000 (07:47 +0000)]
Make this code a little less magic number laden.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131456 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoadd a note
Chris Lattner [Tue, 17 May 2011 07:22:33 +0000 (07:22 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131455 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDrop lli, revise test.
Stuart Hastings [Tue, 17 May 2011 02:38:59 +0000 (02:38 +0000)]
Drop lli, revise test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131452 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoBack out r131444 and r131438; they're breaking nightly tests. I'll look into
Eli Friedman [Tue, 17 May 2011 02:36:59 +0000 (02:36 +0000)]
Back out r131444 and r131438; they're breaking nightly tests.  I'll look into
it more tomorrow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131451 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix test.
Eli Friedman [Tue, 17 May 2011 00:39:14 +0000 (00:39 +0000)]
Fix test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131444 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd target triple so test doesn't fail on Windows machines.
Evan Cheng [Tue, 17 May 2011 00:15:58 +0000 (00:15 +0000)]
Add target triple so test doesn't fail on Windows machines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131439 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd x86 fast-isel for calls returning first-class aggregates. rdar://9435872.
Eli Friedman [Tue, 17 May 2011 00:13:47 +0000 (00:13 +0000)]
Add x86 fast-isel for calls returning first-class aggregates.  rdar://9435872.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131438 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago@llvm.lifetime.begin acts as a load, not @llvm.lifetime.end.
Owen Anderson [Tue, 17 May 2011 00:05:49 +0000 (00:05 +0000)]
@llvm.lifetime.begin acts as a load, not @llvm.lifetime.end.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131437 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach LiveInterval::isZeroLength about null SlotIndexes.
Jakob Stoklund Olesen [Mon, 16 May 2011 23:50:05 +0000 (23:50 +0000)]
Teach LiveInterval::isZeroLength about null SlotIndexes.

When instructions are deleted, they leave tombstone SlotIndex entries.
The isZeroLength method should ignore these null indexes.

This causes RABasic to sometimes spill a callee-saved register in the
abi-isel.ll test, so don't run that test with -regalloc=basic.  Prioritizing
register allocation according to spill weight can cause more registers to be
used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131436 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoKill some dead code.
Jim Grosbach [Mon, 16 May 2011 22:24:07 +0000 (22:24 +0000)]
Kill some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131431 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDelete unused variables.
Dan Gohman [Mon, 16 May 2011 22:19:54 +0000 (22:19 +0000)]
Delete unused variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131430 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTrim #includes.
Dan Gohman [Mon, 16 May 2011 22:14:50 +0000 (22:14 +0000)]
Trim #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131429 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix whitespace and 80-column violations.
Dan Gohman [Mon, 16 May 2011 22:09:53 +0000 (22:09 +0000)]
Fix whitespace and 80-column violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131428 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThere is no need to force DebugLoc on a PHI at this point.
Devang Patel [Mon, 16 May 2011 22:05:03 +0000 (22:05 +0000)]
There is no need to force DebugLoc on a PHI at this point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131427 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTrack how many insns fast-isel successfully selects as well as how many it
Jim Grosbach [Mon, 16 May 2011 21:51:07 +0000 (21:51 +0000)]
Track how many insns fast-isel successfully selects as well as how many it
misses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131426 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove dead code. Fix associated test to use FileCheck.
Eli Friedman [Mon, 16 May 2011 21:28:22 +0000 (21:28 +0000)]
Remove dead code.  Fix associated test to use FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131424 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPreserve debug info for unused zero extended boolean argument.
Devang Patel [Mon, 16 May 2011 21:24:05 +0000 (21:24 +0000)]
Preserve debug info for unused zero extended boolean argument.
Radar 9422775.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131422 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a method I forgot in the last commit. Don't worry, this one passed
Charles Davis [Mon, 16 May 2011 21:13:58 +0000 (21:13 +0000)]
Add a method I forgot in the last commit. Don't worry, this one passed
self-host :).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131421 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake fast-isel work correctly s/uadd.with.overflow intrinsics.
Eli Friedman [Mon, 16 May 2011 21:06:17 +0000 (21:06 +0000)]
Make fast-isel work correctly s/uadd.with.overflow intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131420 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix silly typo.
Eli Friedman [Mon, 16 May 2011 20:34:53 +0000 (20:34 +0000)]
Fix silly typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131419 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoBasic fast-isel of extractvalue. Not too helpful on its own, given the IR clang...
Eli Friedman [Mon, 16 May 2011 20:27:46 +0000 (20:27 +0000)]
Basic fast-isel of extractvalue.  Not too helpful on its own, given the IR clang generates for cases like this, but it should become more useful soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131417 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix errors in this llvm ir example.
Nick Lewycky [Mon, 16 May 2011 19:29:30 +0000 (19:29 +0000)]
Fix errors in this llvm ir example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131416 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a FIXME reminder to remove ForceARMElfPIC switch.
Jason W Kim [Mon, 16 May 2011 16:35:21 +0000 (16:35 +0000)]
Add a FIXME reminder to remove ForceARMElfPIC switch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131411 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agosets bit 0 of the function address of thumb function in .symtab
Rafael Espindola [Mon, 16 May 2011 16:17:21 +0000 (16:17 +0000)]
sets bit 0 of the function address of thumb function in .symtab
("T is 1 if the target symbol S has type STT_FUNC and the
symbol addresses a Thumb instruction ;it is 0 otherwise."
from "ELF for the ARM Architecture" 4.7.1.2)

Patch by Koan-Sin Tan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131406 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoExtra refactoring noticed by Eli Friedman.
Rafael Espindola [Mon, 16 May 2011 15:48:45 +0000 (15:48 +0000)]
Extra refactoring noticed by Eli Friedman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131405 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove redundant template partial specilization.
Zhongxing Xu [Mon, 16 May 2011 12:42:22 +0000 (12:42 +0000)]
Remove redundant template partial specilization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131402 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't do tail calls in a function that call setjmp. The stack might be
Rafael Espindola [Mon, 16 May 2011 03:05:33 +0000 (03:05 +0000)]
Don't do tail calls in a function that call setjmp. The stack might be
corrupted when setjmp returns again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131399 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix copy-pasto.
Charles Davis [Sun, 15 May 2011 17:28:27 +0000 (17:28 +0000)]
Fix copy-pasto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131384 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd stub methods to MCStreamer for emitting Win64 exception-handling
Charles Davis [Sun, 15 May 2011 17:20:01 +0000 (17:20 +0000)]
Add stub methods to MCStreamer for emitting Win64 exception-handling
information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131382 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoGet rid of extern "C" from the Win64 EH header.
Charles Davis [Sun, 15 May 2011 17:09:26 +0000 (17:09 +0000)]
Get rid of extern "C" from the Win64 EH header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131381 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a header containing definitions used to implement Win64 exception handling.
Charles Davis [Sun, 15 May 2011 14:42:22 +0000 (14:42 +0000)]
Add a header containing definitions used to implement Win64 exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131380 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDeclare this function here so that it doesn't get C++ mangling.
Nick Lewycky [Sun, 15 May 2011 07:20:34 +0000 (07:20 +0000)]
Declare this function here so that it doesn't get C++ mangling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131379 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDisable test harder.
Benjamin Kramer [Sat, 14 May 2011 19:30:39 +0000 (19:30 +0000)]
Disable test harder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131363 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDisable this test while I revise it. rdar://problem/9267970
Stuart Hastings [Sat, 14 May 2011 18:39:05 +0000 (18:39 +0000)]
Disable this test while I revise it. rdar://problem/9267970

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131350 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSimplifyCFG: Use ComputeMaskedBits to prune dead cases from switch instructions.
Benjamin Kramer [Sat, 14 May 2011 15:57:25 +0000 (15:57 +0000)]
SimplifyCFG: Use ComputeMaskedBits to prune dead cases from switch instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131345 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAvoid combining GEPs that might overflow at runtime.
Stuart Hastings [Sat, 14 May 2011 05:55:10 +0000 (05:55 +0000)]
Avoid combining GEPs that might overflow at runtime.
rdar://problem/9267970

Patch by Julien Lerouge!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131339 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a FIXME by moving the fast-isel implementation of the objectsize intrinsic from...
Eli Friedman [Sat, 14 May 2011 00:47:51 +0000 (00:47 +0000)]
Fix a FIXME by moving the fast-isel implementation of the objectsize intrinsic from the x86 code to the generic code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131332 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't produce a vmovntdq if we don't have AVX support.
Rafael Espindola [Sat, 14 May 2011 00:30:01 +0000 (00:30 +0000)]
Don't produce a vmovntdq if we don't have AVX support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131330 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoZap useless code; this hasn't done anything useful since fast-isel switched to being...
Eli Friedman [Sat, 14 May 2011 00:19:32 +0000 (00:19 +0000)]
Zap useless code; this hasn't done anything useful since fast-isel switched to being bottom-up (a very long time ago).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131329 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd an operator+= for appending StringRefs onto std::strings.
John McCall [Fri, 13 May 2011 23:58:45 +0000 (23:58 +0000)]
Add an operator+= for appending StringRefs onto std::strings.
Previously this pattern would be compiled using an implicit conversion
to std::string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131325 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoBe a bit more permissive about symbols we don't understand. Just skip them
Jim Grosbach [Fri, 13 May 2011 23:11:30 +0000 (23:11 +0000)]
Be a bit more permissive about symbols we don't understand. Just skip them
rather than throwing an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131322 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoExecutionEngine: move createJIT() definition (v2)
Dylan Noblesmith [Fri, 13 May 2011 22:02:53 +0000 (22:02 +0000)]
ExecutionEngine: move createJIT() definition (v2)

As an ExecutionEngine class function, its definition
really belongs in ExecutionEngine.cpp, not JIT.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131320 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoExecutionEngine: push TargetMachine creation into clients (v2)
Dylan Noblesmith [Fri, 13 May 2011 21:51:29 +0000 (21:51 +0000)]
ExecutionEngine: push TargetMachine creation into clients (v2)

In particular, into EngineBuilder. This should only impact
the private API between the EE and EB classes, not external
clients, since JITCtor and MCJITCtor are both protected members.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131317 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoExecutionEngine: fix JIT/MCJIT selectTarget() duplication (v2)
Dylan Noblesmith [Fri, 13 May 2011 21:36:16 +0000 (21:36 +0000)]
ExecutionEngine: fix JIT/MCJIT selectTarget() duplication (v2)

This prepares for making JITCtor/MCJITCtor take a
TargetMachine* directly from clients like EngineBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131316 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove test.
Rafael Espindola [Fri, 13 May 2011 21:35:17 +0000 (21:35 +0000)]
Move test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131315 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove test.
Rafael Espindola [Fri, 13 May 2011 21:33:32 +0000 (21:33 +0000)]
Move test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131314 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach the RtDyld to tell the memory manager about how much space a function
Jim Grosbach [Fri, 13 May 2011 20:12:14 +0000 (20:12 +0000)]
Teach the RtDyld to tell the memory manager about how much space a function
actually takes rather than how much memory was allocated for it. This
is more accurate and should help the manager pack things more effectively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131305 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove platform-dependent test to appropriate directory.
Galina Kistanova [Fri, 13 May 2011 19:45:05 +0000 (19:45 +0000)]
Move platform-dependent test to appropriate directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131302 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake codegen able to handle values of empty types. This is one way
Rafael Espindola [Fri, 13 May 2011 15:18:06 +0000 (15:18 +0000)]
Make codegen able to handle values of empty types. This is one way
to fix PR9900. I will keep it open until sable is able to comment on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131294 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a source of non determinism in FindUsedTypes, use a SetVector instead of a
Julien Lerouge [Fri, 13 May 2011 05:20:42 +0000 (05:20 +0000)]
Fix a source of non determinism in FindUsedTypes, use a SetVector instead of a
set.

rdar://9423996

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131283 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRe-add the autoconf rule for the docs/doxygen.cfg file.
Peter Collingbourne [Fri, 13 May 2011 03:27:56 +0000 (03:27 +0000)]
Re-add the autoconf rule for the docs/doxygen.cfg file.
For some reason this was not reverted when r103213 was.

At the same time, add an optional rule for clang's doxygen.cfg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131279 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoConvert SimplifyIVUsers into a worklist instead of a single pass over
Andrew Trick [Fri, 13 May 2011 01:12:21 +0000 (01:12 +0000)]
Convert SimplifyIVUsers into a worklist instead of a single pass over
the users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131277 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSince I can't reproduce the failures from 131261, re-trying with a
Stuart Hastings [Fri, 13 May 2011 00:51:54 +0000 (00:51 +0000)]
Since I can't reproduce the failures from 131261, re-trying with a
simplified version.  <rdar://problem/9298790>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131274 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert 131266 and 131261 due to buildbot complaints.
Stuart Hastings [Fri, 13 May 2011 00:15:17 +0000 (00:15 +0000)]
Revert 131266 and 131261 due to buildbot complaints.
rdar://problem/9298790

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131269 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTweak 131261 (thumb2-cbnz.ll) to generate the intended cbnz.
Stuart Hastings [Fri, 13 May 2011 00:10:03 +0000 (00:10 +0000)]
Tweak 131261 (thumb2-cbnz.ll) to generate the intended cbnz.
rdar://problem/9298790

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131266 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoNon-fast-isel followup to 129634; correctly handle branches controlled
Stuart Hastings [Thu, 12 May 2011 23:36:41 +0000 (23:36 +0000)]
Non-fast-isel followup to 129634; correctly handle branches controlled
by non-CMP expressions.  The executable test case (129821) would test
this as well, if we had an "-O0 -disable-arm-fast-isel" LLVM-GCC
tester.  Alas, the ARM assembly would be very difficult to check with
FileCheck.

The thumb2-cbnz.ll test is affected; it generates larger code (tst.w
vs. cmp #0), but I believe the new version is correct.
rdar://problem/9298790

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131261 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate comment.
Evan Cheng [Thu, 12 May 2011 22:35:48 +0000 (22:35 +0000)]
Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131258 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCorrection. Use explicit target triple in the test.
Galina Kistanova [Thu, 12 May 2011 21:55:34 +0000 (21:55 +0000)]
Correction. Use explicit target triple in the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131252 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDoug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
Devang Patel [Thu, 12 May 2011 21:29:42 +0000 (21:29 +0000)]
Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131244 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMCJIT section loading should just skip non-text sections rather than
Jim Grosbach [Thu, 12 May 2011 21:21:16 +0000 (21:21 +0000)]
MCJIT section loading should just skip non-text sections rather than
erroring out completely. Some modules produce sections that aren't referenced,
so it's friendlier to clients like LLDB to just skip them, at least for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131243 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRe-enable branchfolding common code hoisting optimization. Fixed a liveness test...
Evan Cheng [Thu, 12 May 2011 20:30:01 +0000 (20:30 +0000)]
Re-enable branchfolding common code hoisting optimization. Fixed a liveness test bug and also taught it to update liveins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131241 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoLet Objective-C front-end identify class extension, in dwarf output, using an attribu...
Devang Patel [Thu, 12 May 2011 19:06:16 +0000 (19:06 +0000)]
Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131238 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTemporarily disable the transformation. It's breaking 186.crafty in some configuration.
Evan Cheng [Thu, 12 May 2011 18:44:58 +0000 (18:44 +0000)]
Temporarily disable the transformation. It's breaking 186.crafty in some configuration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131235 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThe MCJIT memory manager needs to initialize its Module member.
Jim Grosbach [Thu, 12 May 2011 18:21:23 +0000 (18:21 +0000)]
The MCJIT memory manager needs to initialize its Module member.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131234 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix setting of isCommutable flag.
Akira Hatanaka [Thu, 12 May 2011 17:42:08 +0000 (17:42 +0000)]
Fix setting of isCommutable flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131233 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoreverting test commit
Jason W Kim [Thu, 12 May 2011 17:38:08 +0000 (17:38 +0000)]
reverting test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131232 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTest commit from Mercurial
Jason W Kim [Thu, 12 May 2011 17:37:13 +0000 (17:37 +0000)]
Test commit from Mercurial

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131231 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCMake builds gold by default since revision 127466. This is
Oscar Fuentes [Thu, 12 May 2011 11:26:21 +0000 (11:26 +0000)]
CMake builds gold by default since revision 127466. This is
inconsistent with autoconf, which by default set BINUTILS_INCDIR to
empty and exclude gold from target list.

Based on a patch by Haitao Li!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131229 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRe-commit 131172 with fix. MachineInstr identity checks should check dead
Evan Cheng [Thu, 12 May 2011 00:56:58 +0000 (00:56 +0000)]
Re-commit 131172 with fix. MachineInstr identity checks should check dead
markers. In some cases a register def is dead on one path, but not on
another.

This is passing Clang self-hosting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131214 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoindvars: Added SimplifyIVUsers.
Andrew Trick [Thu, 12 May 2011 00:04:28 +0000 (00:04 +0000)]
indvars: Added SimplifyIVUsers.

Interleave IV simplifications. Currently involves EliminateComparison
and EliminateRemainder. Next I'll add EliminateExtend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131210 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove an unused variable and move a couple others inside DEBUG.
Matt Beaumont-Gay [Wed, 11 May 2011 23:34:51 +0000 (23:34 +0000)]
Remove an unused variable and move a couple others inside DEBUG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131208 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAddress the last bit of relocation flag related divergence betweeen
Jason W Kim [Wed, 11 May 2011 22:53:06 +0000 (22:53 +0000)]
Address the last bit of relocation flag related divergence betweeen
LLVM and binutils.

With this patch, there are no functional differences between the .o
produced directly from LLVM versus the .s to .o via GNU as, for relocation tags
at least, for both PIC and non-PIC modes.

Because some non-PIC reloc tags are used (legally) on PIC, so IsPCRel flag is
necessary but not sufficient to determine whether the overall codegen mode is
PIC or not. Why is this necessary? There is an incompatibility of how relocs
are emitted in the .rodata section.  Binutils PIC likes to emit certain relocs
as section relative offsets.  Non-PIC does not do this.

So I added a hidden switch on the ELFObjectwriter "-arm-elf-force-pic" which
forces the objectwriter to pretend that all relocs are for PIC mode.

Todo: Activate ForceARMElfPIC to true if -relocation-model=pic is selected
on llc.

Todo: There are probably more issues for PIC mode on ARM/MC/ELF...

Todo: Existing tests in MC/ARM/elf-reloc*.ll need to be converted over to .s
tests as well as expanded to cover the gamut.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131205 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTurn this into a table, this will make more sense shortly.
Eric Christopher [Wed, 11 May 2011 21:44:58 +0000 (21:44 +0000)]
Turn this into a table, this will make more sense shortly.

Part of rdar://8470697

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131200 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove this test to CodeGen/Thumb. rdar://problem/9416774
Stuart Hastings [Wed, 11 May 2011 19:41:28 +0000 (19:41 +0000)]
Move this test to CodeGen/Thumb. rdar://problem/9416774

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131196 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIdentify end of prologue (and beginning of function body) using DW_LNS_set_prologue_e...
Devang Patel [Wed, 11 May 2011 19:22:19 +0000 (19:22 +0000)]
Identify end of prologue (and beginning of function body) using DW_LNS_set_prologue_end line table opcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131194 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAvoid hoisting spills when looking at a copy from another register that is also
Jakob Stoklund Olesen [Wed, 11 May 2011 18:25:10 +0000 (18:25 +0000)]
Avoid hoisting spills when looking at a copy from another register that is also
about to be spilled.

This can only happen when two extra snippet registers are included in the spill,
and there is a copy between them. Hoisting the spill creates problems because
the hoist will mark the copy for later dead code elimination, and spilling the
second register will turn the copy into a spill.

<rdar://problem/9420853>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131192 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoReduced test case. rdar://problem/9416774
Stuart Hastings [Wed, 11 May 2011 17:29:25 +0000 (17:29 +0000)]
Reduced test case. rdar://problem/9416774

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131191 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix encoding of Thumb BLX register instructions. Patch by Koan-Sin Tan.
Owen Anderson [Wed, 11 May 2011 17:00:48 +0000 (17:00 +0000)]
Fix encoding of Thumb BLX register instructions.  Patch by Koan-Sin Tan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131189 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTypo and missing checkin from r131186.
Andrew Trick [Wed, 11 May 2011 16:44:08 +0000 (16:44 +0000)]
Typo and missing checkin from r131186.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131187 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoBugpoint support for miscompilations that result in a crash.
Andrew Trick [Wed, 11 May 2011 16:31:24 +0000 (16:31 +0000)]
Bugpoint support for miscompilations that result in a crash.

This change allows bugpoint to pinpoint the "opt" pass and bitcode
segment responsible for a crash caused by miscompilation. At least it
works well for me now, without having to create any custom execution
wrappers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131186 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAnd lo, I was given a testcase for 131152. rdar://problem/9416774
Stuart Hastings [Wed, 11 May 2011 16:00:21 +0000 (16:00 +0000)]
And lo, I was given a testcase for 131152.  rdar://problem/9416774

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131184 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFixes a bug in the DAGCombiner. LoadSDNodes have two values (data, chain).
Nadav Rotem [Wed, 11 May 2011 14:40:50 +0000 (14:40 +0000)]
Fixes a bug in the DAGCombiner.  LoadSDNodes have two values (data, chain).
If there is a store after the load node, then there is a chain, which means
that there is another user. Thus, asking hasOneUser would fail. Instead we
ask hasNUsesOfValue on the 'data' value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131183 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoHandle gcc-compatible compilers (such as clang) the same way we handle
Oscar Fuentes [Wed, 11 May 2011 13:53:08 +0000 (13:53 +0000)]
Handle gcc-compatible compilers (such as clang) the same way we handle
gcc.

Fixes PR9886.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131181 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd custom lowering of X86 vector SRA/SRL/SHL when the shift amount is a splat vector.
Nadav Rotem [Wed, 11 May 2011 08:12:09 +0000 (08:12 +0000)]
Add custom lowering of X86 vector SRA/SRL/SHL when the shift amount is a splat vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131179 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert 131172 as it is causing clang to miscompile itself. I will try
Rafael Espindola [Wed, 11 May 2011 03:27:17 +0000 (03:27 +0000)]
Revert 131172 as it is causing clang to miscompile itself. I will try
to provide a reduced testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131176 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoGive the 'eh.sjlj.dispatchsetup' intrinsic call the value coming from the setjmp
Bill Wendling [Wed, 11 May 2011 01:11:55 +0000 (01:11 +0000)]
Give the 'eh.sjlj.dispatchsetup' intrinsic call the value coming from the setjmp
intrinsic call. This prevents it from being reordered so that it appears
*before* the setjmp intrinsic (thus making it completely useless).
<rdar://problem/9409683>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131174 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix comment.
Bill Wendling [Wed, 11 May 2011 01:08:39 +0000 (01:08 +0000)]
Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131173 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a late optimization to BranchFolding that hoist common instruction sequences
Evan Cheng [Wed, 11 May 2011 01:03:01 +0000 (01:03 +0000)]
Add a late optimization to BranchFolding that hoist common instruction sequences
at the start of basic blocks to their common predecessor. It's actually quite
common (e.g. about 50 times in JM/lencod) and has shown to be a nice code size
benefit. e.g.

        pushq   %rax
        testl   %edi, %edi
        jne     LBB0_2
## BB#1:
        xorb    %al, %al
        popq    %rdx
        ret
LBB0_2:
        xorb    %al, %al
        callq   _foo
        popq    %rdx
        ret

=>

        pushq   %rax
        xorb    %al, %al
        testl   %edi, %edi
        je      LBB0_2
## BB#1:
        callq   _foo
LBB0_2:
        popq    %rdx
        ret

rdar://9145558

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131172 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoOptimize atomic lock or that doesn't use the result value.
Eric Christopher [Tue, 10 May 2011 23:57:45 +0000 (23:57 +0000)]
Optimize atomic lock or that doesn't use the result value.

Next up: xor and and.

Part of rdar://8470697

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131171 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd triple.
Rafael Espindola [Tue, 10 May 2011 23:14:29 +0000 (23:14 +0000)]
Add triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131169 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix cmake again.
Rafael Espindola [Tue, 10 May 2011 22:42:41 +0000 (22:42 +0000)]
Fix cmake again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131164 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove empty file.
Nick Lewycky [Tue, 10 May 2011 22:38:17 +0000 (22:38 +0000)]
Remove empty file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131162 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAvoid a gcc warning.
Rafael Espindola [Tue, 10 May 2011 22:28:35 +0000 (22:28 +0000)]
Avoid a gcc warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131161 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix cmake build.
Rafael Espindola [Tue, 10 May 2011 22:19:33 +0000 (22:19 +0000)]
Fix cmake build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131160 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert r131155 for now. It makes VMCore depend on Analysis and Transforms
Nick Lewycky [Tue, 10 May 2011 22:16:06 +0000 (22:16 +0000)]
Revert r131155 for now. It makes VMCore depend on Analysis and Transforms
headers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131159 91177308-0d34-0410-b5e6-96231b3b80d8