oota-llvm.git
13 years agoMake the threshold used by branch folding softer. Before we would get a
Rafael Espindola [Tue, 14 Jun 2011 04:41:17 +0000 (04:41 +0000)]
Make the threshold used by branch folding softer. Before we would get a
sharp all or nothing transition when one extra predecessor was added. Now
we still test first ones for merging.

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

13 years agoFit banner in 80-col and adjust whitespace. No functionality changes.
Nick Lewycky [Tue, 14 Jun 2011 03:23:52 +0000 (03:23 +0000)]
Fit banner in 80-col and adjust whitespace. No functionality changes.

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

13 years agoHeuristic: If the number of operands in the alias are more than the number of
Bill Wendling [Tue, 14 Jun 2011 03:17:20 +0000 (03:17 +0000)]
Heuristic: If the number of operands in the alias are more than the number of
operands in the aliasee, don't print the alias.

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

13 years agoTest case for r132797.
John McCall [Tue, 14 Jun 2011 03:02:05 +0000 (03:02 +0000)]
Test case for r132797.

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

13 years agoUse IRBuilder to make our intrinsic calls in the inliner so that we pick up
John McCall [Tue, 14 Jun 2011 02:51:53 +0000 (02:51 +0000)]
Use IRBuilder to make our intrinsic calls in the inliner so that we pick up
line info correctly.

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

13 years agoUpdate BitcodeWriter to match recent Triple changes. rdar://9603399
Evan Cheng [Tue, 14 Jun 2011 01:51:33 +0000 (01:51 +0000)]
Update BitcodeWriter to match recent Triple changes. rdar://9603399

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

13 years agoUse Value::stripPointerCasts instead of reinventing part of the wheel.
Nick Lewycky [Tue, 14 Jun 2011 00:59:24 +0000 (00:59 +0000)]
Use Value::stripPointerCasts instead of reinventing part of the wheel.

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

13 years agoFix grammar.
Cameron Zwarich [Mon, 13 Jun 2011 23:39:23 +0000 (23:39 +0000)]
Fix grammar.

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

13 years agoClean up a few 80 column violations.
Jim Grosbach [Mon, 13 Jun 2011 22:54:22 +0000 (22:54 +0000)]
Clean up a few 80 column violations.

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

13 years agoRename MergeInType to MergeInTypeForLoadOrStore.
Cameron Zwarich [Mon, 13 Jun 2011 21:44:43 +0000 (21:44 +0000)]
Rename MergeInType to MergeInTypeForLoadOrStore.

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

13 years agoRemove the HadAVector instance variable and replace it with a use of ScalarKind.
Cameron Zwarich [Mon, 13 Jun 2011 21:44:40 +0000 (21:44 +0000)]
Remove the HadAVector instance variable and replace it with a use of ScalarKind.

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

13 years agoRemove a vacuous check.
Cameron Zwarich [Mon, 13 Jun 2011 21:44:38 +0000 (21:44 +0000)]
Remove a vacuous check.

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

13 years agoHave SRoA explicitly track the kind of scalar it is promoting. This is pretty
Cameron Zwarich [Mon, 13 Jun 2011 21:44:35 +0000 (21:44 +0000)]
Have SRoA explicitly track the kind of scalar it is promoting. This is pretty
spartan right now, but I plan to encode more information in this enum to improve
the correctness and reliability of SRoA. At least this first pass makes it
possible to make VectorTy an actual VectorType.

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

13 years agoRemove an argument that is always true.
Cameron Zwarich [Mon, 13 Jun 2011 21:44:31 +0000 (21:44 +0000)]
Remove an argument that is always true.

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

13 years agoFix coordination for using R4 in Thumb1 as a scratch for SP restore.
Jim Grosbach [Mon, 13 Jun 2011 21:18:25 +0000 (21:18 +0000)]
Fix coordination for using R4 in Thumb1 as a scratch for SP restore.

The logic for reserving R4 for use as a scratch needs to match that for
actually using it. Also, it's not necessary for immediate <=508, so adjust
the value checked.

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

13 years agoAliased flag options should be directed to stdout, not stderr to be consistent. Patch...
Evan Cheng [Mon, 13 Jun 2011 20:45:54 +0000 (20:45 +0000)]
Aliased flag options should be directed to stdout, not stderr to be consistent. Patch by Julien Lerouge.

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

13 years agoAdd compatibility version when compiling the Apple way.
Bill Wendling [Mon, 13 Jun 2011 20:14:37 +0000 (20:14 +0000)]
Add compatibility version when compiling the Apple way.
<rdar://problem/9600408>

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

13 years agoAvoid fusing bitcasts with dynamic allocas if the amount-to-allocate
Stuart Hastings [Mon, 13 Jun 2011 18:48:49 +0000 (18:48 +0000)]
Avoid fusing bitcasts with dynamic allocas if the amount-to-allocate
might overflow.  Re-typing the alloca to a larger type (e.g. double)
hoists a shift into the alloca, potentially exposing overflow in the
expression.  rdar://problem/9265821

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

13 years agoMove class into an anonymous namespace.
Benjamin Kramer [Mon, 13 Jun 2011 18:38:56 +0000 (18:38 +0000)]
Move class into an anonymous namespace.

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

13 years agoFix a bug in FindMemType. When widening vector loads, use a wider memory type
Nadav Rotem [Mon, 13 Jun 2011 18:13:24 +0000 (18:13 +0000)]
Fix a bug in FindMemType. When widening vector loads, use a wider memory type
only if the number of packed elements is a power of two.
Bug found in Duncan's testcase.

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

13 years agomention graph vis isn't available in Release builds.
Chris Lattner [Mon, 13 Jun 2011 15:59:35 +0000 (15:59 +0000)]
mention graph vis isn't available in Release builds.

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

13 years agoInstCombine: Fold A-b == C --> b == A-C if A and C are constants.
Benjamin Kramer [Mon, 13 Jun 2011 15:24:24 +0000 (15:24 +0000)]
InstCombine: Fold A-b == C --> b == A-C if A and C are constants.

The backend already knew this trick.

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

13 years agoRevert r132910 and r132909 on behalf of Michael. They didn't build with clang.
Benjamin Kramer [Mon, 13 Jun 2011 12:56:51 +0000 (12:56 +0000)]
Revert r132910 and r132909 on behalf of Michael. They didn't build with clang.

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

13 years agoRevert the last two commits in the series. r132911, r132912.
Michael J. Spencer [Mon, 13 Jun 2011 11:53:31 +0000 (11:53 +0000)]
Revert the last two commits in the series. r132911, r132912.

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

13 years agoModify llvm-nm to use new Binary creation method.
Michael J. Spencer [Mon, 13 Jun 2011 11:12:42 +0000 (11:12 +0000)]
Modify llvm-nm to use new Binary creation method.

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

13 years agoMake Binary the parent of ObjectFile and update children to new interface.
Michael J. Spencer [Mon, 13 Jun 2011 11:12:33 +0000 (11:12 +0000)]
Make Binary the parent of ObjectFile and update children to new interface.

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

13 years agoAdd Binary class. This is a cleaner parent than ObjectFile.
Michael J. Spencer [Mon, 13 Jun 2011 11:12:12 +0000 (11:12 +0000)]
Add Binary class. This is a cleaner parent than ObjectFile.

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

13 years agoAdd Object/Error.
Michael J. Spencer [Mon, 13 Jun 2011 11:11:59 +0000 (11:11 +0000)]
Add Object/Error.

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

13 years agoFix spelling and sort CMakeLists.txt.
Michael J. Spencer [Mon, 13 Jun 2011 11:11:39 +0000 (11:11 +0000)]
Fix spelling and sort CMakeLists.txt.

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

13 years agoIt's possible that an all-zero GEP may be used as the argument to lifetime
Nick Lewycky [Mon, 13 Jun 2011 07:52:46 +0000 (07:52 +0000)]
It's possible that an all-zero GEP may be used as the argument to lifetime
intrinsics. In fact, we'll optimize a bitcast to that when possible. Detect it
when looking for the lifetime intrinsics.

No test case, noticed by inspection.

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

13 years agoBe less aggressive about hinting in RAFast.
Jakob Stoklund Olesen [Mon, 13 Jun 2011 03:26:46 +0000 (03:26 +0000)]
Be less aggressive about hinting in RAFast.

In particular, don't spill dirty registers only to satisfy a hint. It is
not worth it.

The attached test case provides an example where the fast allocator
would spill a register when other registers are available.

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

13 years agoInclude callee-saved registers in debug output.
Jakob Stoklund Olesen [Mon, 13 Jun 2011 03:26:42 +0000 (03:26 +0000)]
Include callee-saved registers in debug output.

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

13 years agoFix invalid uses of Twine. Hopefully this fixes the problem that Takumi is
Rafael Espindola [Mon, 13 Jun 2011 03:09:13 +0000 (03:09 +0000)]
Fix invalid uses of Twine. Hopefully this fixes the problem that Takumi is
having.

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

13 years agoInstCombine: Shrink ((zext X) & C1) == C2 to fold away the cast if the "zext" and...
Benjamin Kramer [Sun, 12 Jun 2011 22:48:00 +0000 (22:48 +0000)]
InstCombine: Shrink ((zext X) & C1) == C2 to fold away the cast if the "zext" and the "and" have one use.

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

13 years agoSimplify code. No functionality changes, name changes aside.
Benjamin Kramer [Sun, 12 Jun 2011 22:47:53 +0000 (22:47 +0000)]
Simplify code. No functionality changes, name changes aside.

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

13 years agoHappy new year.
Benjamin Kramer [Sun, 12 Jun 2011 15:26:54 +0000 (15:26 +0000)]
Happy new year.

Only 163 days late!

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

13 years agoFix a bug in the calculation of the vectorTypeBreakdown into registers. Odd
Nadav Rotem [Sun, 12 Jun 2011 14:56:55 +0000 (14:56 +0000)]
Fix a bug in the calculation of the vectorTypeBreakdown into registers. Odd
types such as i33 were rounded to i32. Originated from Duncan's testcase.

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

13 years agoImprove the generated code by getCopyFromPartsVector for promoted integer types.
Nadav Rotem [Sun, 12 Jun 2011 14:49:38 +0000 (14:49 +0000)]
Improve the generated code by getCopyFromPartsVector for promoted integer types.
Instead of scalarizing, and doing an element-by-element truncat, use vector
truncate.
Add support for scalarization of vectors:  i8 -> <1 x i1> (from Duncan's
testcase).

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

13 years agoBugfix: When looking for a legal vector type, stop looking when a non-simple
Nadav Rotem [Sun, 12 Jun 2011 14:40:30 +0000 (14:40 +0000)]
Bugfix: When looking for a legal vector type, stop looking when a non-simple
element type is found.
This fix addresses some of the tests in Duncan's testcase (forthcoming).

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

13 years agoTweak hash function and compress hash tables.
Jakob Stoklund Olesen [Sun, 12 Jun 2011 07:04:32 +0000 (07:04 +0000)]
Tweak hash function and compress hash tables.

Make the hash tables as small as possible while ensuring that all
lookups can be done in less than 8 probes.

Cut the aliases hash table in half by only storing a < b pairs - it
is a symmetric relation.

Use larger multipliers on the initial hash function to ensure that it
properly covers the whole table, and to resolve some clustering in the
very regular ARM register bank.

This reduces the size of most of these tables by 4x - 8x. For instance,
the ARM tables shrink from 48 KB to 8 KB.

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

13 years agoRemove now dead code.
Jakob Stoklund Olesen [Sun, 12 Jun 2011 07:04:28 +0000 (07:04 +0000)]
Remove now dead code.

These computations have been moved to CodeGenRegisters.cpp.

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

13 years agoExtract the generateHashTable function.
Jakob Stoklund Olesen [Sun, 12 Jun 2011 07:04:26 +0000 (07:04 +0000)]
Extract the generateHashTable function.

The constant hash tables for sub-registers and overlaps are generated
the same way, so extract a function to generate and print the hash
table.

Also use the information computed by CodeGenRegisters.cpp instead of the
locally data.

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

13 years agoReally fix the fall-through logic.
Rafael Espindola [Sun, 12 Jun 2011 05:57:01 +0000 (05:57 +0000)]
Really fix the fall-through logic.
Add a triple to the tests.

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

13 years agoTest for the previous commit.
Rafael Espindola [Sun, 12 Jun 2011 05:35:39 +0000 (05:35 +0000)]
Test for the previous commit.

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

13 years agoFix silly bug I introduce in the previous commit. Fixes debug builds.
Rafael Espindola [Sun, 12 Jun 2011 05:26:32 +0000 (05:26 +0000)]
Fix silly bug I introduce in the previous commit. Fixes debug builds.

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

13 years agoAnalyzeBranch doesn't change which successors a bb has, just the order
Rafael Espindola [Sun, 12 Jun 2011 03:20:32 +0000 (03:20 +0000)]
AnalyzeBranch doesn't change which successors a bb has, just the order
we try to branch to them.

Before we were creating successor lists with duplicated entries. Fixing that
found a bug in isBlockOnlyReachableByFallthrough that would causes it to
return the wrong answer for

-----------
...
jne foo
jmp bar

foo:
----------

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

13 years agoCompute lists of sub-regs, super-regs, and overlapping regs.
Jakob Stoklund Olesen [Sun, 12 Jun 2011 03:05:52 +0000 (03:05 +0000)]
Compute lists of sub-regs, super-regs, and overlapping regs.

Besides moving structural computations to CodeGenRegisters.cpp, this
also well-defines the order of these lists:

- Sub-register lists come from a pre-order traversal of the graph
  defined by the SubRegs lists in the .td files.

- Super-register lists are topologically ordered so no register comes
  before any of its sub-registers. When the sub-register graph is not a
  tree, independent super-registers appear in numerical order.

- Lists of overlapping registers are ordered according to register
  number.

This reverses the order of the super-regs lists, but nobody was
depending on that. The previous order of the overlaps lists was odd, and
it may have depended on the precise behavior of std::stable_sort.

The old computations are still there, but will be removed shortly.

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

13 years agoPut FrameSetup flag on x86 instructions that set up the call frame. No
Charles Davis [Sun, 12 Jun 2011 01:45:54 +0000 (01:45 +0000)]
Put FrameSetup flag on x86 instructions that set up the call frame. No
functionality change.

Later on, we'll use the flag to emit SEH pseudo-ops that describe how the
call frame was built.

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

13 years agoReformatting. Moving class definitions to more natural places. No functionalogical...
Bill Wendling [Sat, 11 Jun 2011 11:37:49 +0000 (11:37 +0000)]
Reformatting. Moving class definitions to more natural places. No functionalogical changes.

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

13 years agoRevert r132871.
Chad Rosier [Sat, 11 Jun 2011 02:27:46 +0000 (02:27 +0000)]
Revert r132871.

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

13 years agoTypo.
Chad Rosier [Sat, 11 Jun 2011 02:16:36 +0000 (02:16 +0000)]
Typo.

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

13 years agoMake sure to pass OpFlags into MachineInstrBuilder::addExternalSymbol; the
Eli Friedman [Sat, 11 Jun 2011 01:55:07 +0000 (01:55 +0000)]
Make sure to pass OpFlags into MachineInstrBuilder::addExternalSymbol; the
memcpy/memset symbol doesn't get marked up correctly in PIC modes otherwise.
Should fix llvm-x86_64-linux-checks buildbot.  Followup to r132864.

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

13 years agoBranch profiling: floating-point avoidance.
Andrew Trick [Sat, 11 Jun 2011 01:05:22 +0000 (01:05 +0000)]
Branch profiling: floating-point avoidance.

Patch by: Jakub Staszak!

Introduces BranchProbability. Changes unsigned to uint32_t all over and
uint64_t only when overflow is expected.

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

13 years agoMove the list of registers into CodeGenRegBank.
Jakob Stoklund Olesen [Sat, 11 Jun 2011 00:28:06 +0000 (00:28 +0000)]
Move the list of registers into CodeGenRegBank.

Also move the sub-register index computations from RegisterInfoEmitter
into CodeGenRegBank.

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

13 years agoAdd full x86 fast-isel support for memcpy and memset.
Eli Friedman [Fri, 10 Jun 2011 23:39:36 +0000 (23:39 +0000)]
Add full x86 fast-isel support for memcpy and memset.

rdar://9431466

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

13 years ago80-col cleanups.
Eric Christopher [Fri, 10 Jun 2011 23:05:08 +0000 (23:05 +0000)]
80-col cleanups.

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

13 years agoInitialize BasicAA's AliasCache to set it to use fewer buckets by
Dan Gohman [Fri, 10 Jun 2011 22:30:30 +0000 (22:30 +0000)]
Initialize BasicAA's AliasCache to set it to use fewer buckets by
default, since it usually has very few elements. This speeds up
alias queries in many cases, because AliasCache.clear() doesn't
have to visit as many buckets.

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

13 years agoInstall libprofile_rt.dylib where it's more available for gcov support.
Bill Wendling [Fri, 10 Jun 2011 21:47:14 +0000 (21:47 +0000)]
Install libprofile_rt.dylib where it's more available for gcov support.
<rdar://problem/9583891>

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

13 years agoRemoved tabs. Also fixed my editor...
Rafael Espindola [Fri, 10 Jun 2011 21:01:53 +0000 (21:01 +0000)]
Removed tabs. Also fixed my editor...

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

13 years agoProvide an ARMCCState subclass of CCState so that ARM clients will always set
Cameron Zwarich [Fri, 10 Jun 2011 20:59:24 +0000 (20:59 +0000)]
Provide an ARMCCState subclass of CCState so that ARM clients will always set
CallOrPrologue correctly and eliminate the existing setter.

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

13 years agoRename the ParmContext enum values to make a bit more sense and add a small
Cameron Zwarich [Fri, 10 Jun 2011 20:37:36 +0000 (20:37 +0000)]
Rename the ParmContext enum values to make a bit more sense and add a small
comment on their meaning.

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

13 years agoRemove tabs.
Cameron Zwarich [Fri, 10 Jun 2011 20:31:39 +0000 (20:31 +0000)]
Remove tabs.

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

13 years agoRemove a pointless const_cast.
Cameron Zwarich [Fri, 10 Jun 2011 20:30:08 +0000 (20:30 +0000)]
Remove a pointless const_cast.

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

13 years agoRemove duplicated test.
Rafael Espindola [Fri, 10 Jun 2011 20:08:23 +0000 (20:08 +0000)]
Remove duplicated test.
Thanks Bob Wilson for noticing it!

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

13 years agoMove some sub-register index calculations to CodeGenRegisters.cpp
Jakob Stoklund Olesen [Fri, 10 Jun 2011 18:40:00 +0000 (18:40 +0000)]
Move some sub-register index calculations to CodeGenRegisters.cpp

Create a new CodeGenRegBank class that will eventually hold all the code
that computes the register structure from Records.

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

13 years agoFix example code in comment.
Richard Osborne [Fri, 10 Jun 2011 12:28:24 +0000 (12:28 +0000)]
Fix example code in comment.

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

13 years agoAdd -mattr=+sse2 to make the buildbots happy.
Eli Friedman [Fri, 10 Jun 2011 08:26:26 +0000 (08:26 +0000)]
Add -mattr=+sse2 to make the buildbots happy.

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

13 years agoReverted r132785. It seems this test needs more research.
Galina Kistanova [Fri, 10 Jun 2011 05:35:25 +0000 (05:35 +0000)]
Reverted r132785. It seems this test needs more research.

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

13 years agoChanged condition.
Galina Kistanova [Fri, 10 Jun 2011 03:57:02 +0000 (03:57 +0000)]
Changed condition.

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

13 years agoAdding a test case for revision 132825.
Chad Rosier [Fri, 10 Jun 2011 02:44:19 +0000 (02:44 +0000)]
Adding a test case for revision 132825.

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

13 years agoPR10092 (second try): Don't crash on a load without a momoperand; fast-isel creates...
Eli Friedman [Fri, 10 Jun 2011 01:13:01 +0000 (01:13 +0000)]
PR10092 (second try): Don't crash on a load without a momoperand; fast-isel creates loads like this.

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

13 years agoEnsure that EmitGlobalVariable is correctly differentiating between declarations
Chad Rosier [Fri, 10 Jun 2011 00:53:15 +0000 (00:53 +0000)]
Ensure that EmitGlobalVariable is correctly differentiating between declarations
and definitions when emitting global variables.  This was causing global
declarations to be emitted as if they were definitions.
Fixes <rdar://problem/9429892>.

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

13 years agoAdd a simple test which makes sure folding immediate float zero to a memory operand...
Eli Friedman [Fri, 10 Jun 2011 00:30:08 +0000 (00:30 +0000)]
Add a simple test which makes sure folding immediate float zero to a memory operand works.

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

13 years agoMake the optional verification step more strict.
Rafael Espindola [Thu, 9 Jun 2011 23:55:56 +0000 (23:55 +0000)]
Make the optional verification step more strict.

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

13 years agoAvoid a gcc warning about multiline comments.
Rafael Espindola [Thu, 9 Jun 2011 23:51:45 +0000 (23:51 +0000)]
Avoid a gcc warning about multiline comments.

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

13 years agoOn last fix to the early tail duplication.
Rafael Espindola [Thu, 9 Jun 2011 23:22:56 +0000 (23:22 +0000)]
On last fix to the early tail duplication.

With this I am able to bootstrap clang with early tail duplication enabled
for any small bb and setting tail-dup-size to a relatively large value(8) to
stress this code.

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

13 years agoChris fixed this README a while back by changing how clang generates code for structs...
Eli Friedman [Thu, 9 Jun 2011 23:02:19 +0000 (23:02 +0000)]
Chris fixed this README a while back by changing how clang generates code for structs like the given struct.

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

13 years agoAlso consider phi nodes when deciding if a register is live out.
Rafael Espindola [Thu, 9 Jun 2011 22:53:47 +0000 (22:53 +0000)]
Also consider phi nodes when deciding if a register is live out.

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

13 years agoA CCState was being created without setting whether it is in the Call or Prologue...
Cameron Zwarich [Thu, 9 Jun 2011 22:30:07 +0000 (22:30 +0000)]
A CCState was being created without setting whether it is in the Call or Prologue state,
causing an assertion failure downstream. This fixes <rdar://problem/9562908>.

This really seems like it should always be set at CCState creation time, so mistakes like
this can never happen. I'll take a look at doing that.

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

13 years agoChange this DAGCombine to build AND of SHR instead of SHR of AND; this matches the...
Eli Friedman [Thu, 9 Jun 2011 22:14:44 +0000 (22:14 +0000)]
Change this DAGCombine to build AND of SHR instead of SHR of AND; this matches the ordering we prefer in instcombine.  Part of rdar://9562809.

The potential DAGCombine which enforces this more generally messes up some other very fragile patterns, so I'm leaving that alone, at least for now.

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

13 years agoAnalyzeBranch modifies the bb, but we don't want to modify a bb with
Rafael Espindola [Thu, 9 Jun 2011 21:43:25 +0000 (21:43 +0000)]
AnalyzeBranch modifies the bb, but we don't want to modify a bb with
eh edges. Swap the order of the checks to avoid it.

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

13 years agoA PHI in this basic block is a use in another basic block.
Rafael Espindola [Thu, 9 Jun 2011 20:55:41 +0000 (20:55 +0000)]
A PHI in this basic block is a use in another basic block.

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

13 years agoWhen deleting a basic block, remove call edges only for non-intrinsics.
John McCall [Thu, 9 Jun 2011 20:31:09 +0000 (20:31 +0000)]
When deleting a basic block, remove call edges only for non-intrinsics.

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

13 years agoFix emission of PPC64 assembler on non-darwin platforms by splitting
Roman Divacky [Thu, 9 Jun 2011 20:25:38 +0000 (20:25 +0000)]
Fix emission of PPC64 assembler on non-darwin platforms by splitting
VK_PPC_{HA,LO}16 into darwin and gas variants.

Darwin wants {ha,lo}16(symbol) while gnu as wants symbol@{ha,l}.

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

13 years agoModify comment.
Johnny Chen [Thu, 9 Jun 2011 20:11:46 +0000 (20:11 +0000)]
Modify comment.

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

13 years agoSplitCriticalEdge can sometimes split the edge from an invoke to a landing
John McCall [Thu, 9 Jun 2011 20:06:24 +0000 (20:06 +0000)]
SplitCriticalEdge can sometimes split the edge from an invoke to a landing
pad, separating the exception and selector calls from the new lpad.  Teaching
it not to do that, or to properly adjust the CFG afterwards, is out of
scope because it would require the other edges to the landing pad to be split
as well (effectively).  Instead, just recover from the most likely cases
during inlining.  The best long-term solution is to change the exception
representation and commit to either requiring or not requiring the more
complex edge-splitting logic;  this is just a shorter-term hack.

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

13 years agoRefactor some checks into shouldTailDuplicate. Update comments.
Rafael Espindola [Thu, 9 Jun 2011 19:54:42 +0000 (19:54 +0000)]
Refactor some checks into shouldTailDuplicate. Update comments.
No functionality change.

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

13 years agoTeach the CallGraph to ignore calls to intrinsics.
John McCall [Thu, 9 Jun 2011 19:46:27 +0000 (19:46 +0000)]
Teach the CallGraph to ignore calls to intrinsics.

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

13 years agoRevert 132789; it breaks tests. My mistake.
Eli Friedman [Thu, 9 Jun 2011 19:33:30 +0000 (19:33 +0000)]
Revert 132789; it breaks tests.  My mistake.

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

13 years agoRemove an uneeded switch - Turns out reloc results are identical w/o the switch....
Jason W Kim [Thu, 9 Jun 2011 19:13:45 +0000 (19:13 +0000)]
Remove an uneeded switch - Turns out reloc results are identical w/o the switch. (face+palm)

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

13 years agoAdd a check to make sure we don't crash with strange configurations where we do fast...
Eli Friedman [Thu, 9 Jun 2011 18:55:00 +0000 (18:55 +0000)]
Add a check to make sure we don't crash with strange configurations where we do fast-isel, then try to fold instructions. PR10092.

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

13 years agoMove TableGen's register bank classes to their own source file.
Jakob Stoklund Olesen [Thu, 9 Jun 2011 18:42:07 +0000 (18:42 +0000)]
Move TableGen's register bank classes to their own source file.

I'll be moving some more code there to gather all of the
register-specific stuff in one place. Currently it is shared between
CodeGenTarget and RegisterInfoEmitter.

The plan is that CodeGenRegisters can compute the full register bank
structure while RegisterInfoEmitter only will handle the printing part.

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

13 years agoAdded dg.exp to run FrontendC ARM-dependent tests; updated inline-asm-multichar.c...
Galina Kistanova [Thu, 9 Jun 2011 17:18:37 +0000 (17:18 +0000)]
Added dg.exp to run FrontendC ARM-dependent tests; updated inline-asm-multichar.c test per this change.

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

13 years agoAdd special-case range checking for VCVT_N intrinsic immediate operands.
Bob Wilson [Thu, 9 Jun 2011 16:57:29 +0000 (16:57 +0000)]
Add special-case range checking for VCVT_N intrinsic immediate operands.
Radar 9558930.

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

13 years agoRemove custom allocation order boilerplate that is no longer needed.
Jakob Stoklund Olesen [Thu, 9 Jun 2011 16:56:59 +0000 (16:56 +0000)]
Remove custom allocation order boilerplate that is no longer needed.

The register allocators automatically filter out reserved registers and
place the callee saved registers last in the allocation order, so custom
methods are no longer necessary just for that.

Some targets still use custom allocation orders:

ARM/Thumb: The high registers are removed from GPR in thumb mode. The
NEON allocation orders prefer to use non-VFP2 registers first.

X86: The GR8 classes omit AH-DH in x86-64 mode to avoid REX trouble.

SystemZ: Some of the allocation orders are omitting R12 aliases without
explanation. I don't understand this target well enough to fix that. It
looks like all the boilerplate could be removed by reserving the right
registers.

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

13 years agoSpeculatively revert 132758 and 132768 to try to fix the Windows buildbots.
Eric Christopher [Thu, 9 Jun 2011 16:03:19 +0000 (16:03 +0000)]
Speculatively revert 132758 and 132768 to try to fix the Windows buildbots.

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

13 years agoRecommit r132764 since it didn't cause the windows buildbot failures.
Eric Christopher [Thu, 9 Jun 2011 15:39:01 +0000 (15:39 +0000)]
Recommit r132764 since it didn't cause the windows buildbot failures.

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

13 years agoImprove the handling of available_externally and llvm.global_ctors.
Rafael Espindola [Thu, 9 Jun 2011 14:38:09 +0000 (14:38 +0000)]
Improve the handling of available_externally and llvm.global_ctors.

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

13 years agoEnable printf() to iprintf() optimization for the TCE target.
Duncan Sands [Thu, 9 Jun 2011 11:11:45 +0000 (11:11 +0000)]
Enable printf() to iprintf() optimization for the TCE target.
Patch by Pekka Jaaskelainen.

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

13 years agoadd another sandybridge alias.
Chris Lattner [Thu, 9 Jun 2011 06:38:17 +0000 (06:38 +0000)]
add another sandybridge alias.

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