Devang Patel
30159729ad
Use std::deque to manage loop queue inside LPPassManager.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34943 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 02:30:46 +00:00
Devang Patel
fe613905b3
Keep track of inherited analysis. For example, if a loop pass does not
...
preserve dominator info then it should update parent FPPassManager's
available analysis info to reflect this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34942 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 01:55:46 +00:00
Devang Patel
22a1cf9d3a
Add preparePassManager() hook. This allows each pass to check whether
...
current active pass manager is appropriate or not.
A loop pass may consider current LPPassManager in appropraite if loop
pass is not preserving analysis information that is used by other
passes managed by current LPPassManager. In such situation, loop pass
can pop current LPPassManager from the PMStack using this hook
and use new LPPassManager for itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34941 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 01:06:16 +00:00
Chris Lattner
b9a7bea99c
Switch PPC return lower to use an autogenerated CC description.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34940 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 00:59:59 +00:00
Reid Spencer
baf1e4b914
Remove an unnecessary if statement and adjust indentation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34939 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 23:36:13 +00:00
Bill Wendling
229baffc4e
Add the emms intrinsic for MMX support.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34938 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 23:09:45 +00:00
Reid Spencer
53201869cd
Document the use of getValueType() more accurately, specifically explain
...
that the instruction opcode is added to the InstructionVal value and the
consequences of that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34937 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 23:06:32 +00:00
Devang Patel
cf5fb2b614
Current pass manager, not the parent pass manager, assumes the role of
...
last user when one of the managed pass uses info provided by parent pass
manager.
This was exposed by LPPassManager work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34936 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 22:57:49 +00:00
Reid Spencer
61e85b2821
Add a test case for a particular udiv/select transform.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34935 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 22:51:08 +00:00
Devang Patel
7f99761143
Avoid constructing std::strings unless pass debugging is ON.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34933 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 20:01:30 +00:00
Devang Patel
55d5ac7b5b
Account for time consumed by releaseMemory() properly.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34932 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 18:20:51 +00:00
Lauro Ramos Venancio
6d7dd8ef46
Use init_array/fini_array sections for static contructors/destructors when the ABI is AAPCS.
...
Fix SingleSource/Regression/C/ConstructorDestructorAttributes test on arm-linux-gnueabi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34931 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 17:59:58 +00:00
Jeff Cohen
72adee00f6
The hack won't work on VS 2005, and it might not be needed anyway.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34930 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 17:22:33 +00:00
Zhou Sheng
3130835bdf
Correct the calculation in APInt::logBase2().
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34929 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 16:42:58 +00:00
Duncan Sands
ef476fdce2
Credit self for Ada front-end.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34928 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 09:21:11 +00:00
Duncan Sands
d1d75b4dcb
Testcase for handling of static constant declarations in EmitBIND_EXPR.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34927 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 08:39:58 +00:00
Duncan Sands
bc95a5487c
Testcase causing the Ada front-end to create bogus constructor fields.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34926 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 08:34:35 +00:00
Duncan Sands
143cced66b
New directory for Ada testcases. Test handling of NON_LVALUE_EXPR.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34925 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 08:20:48 +00:00
Chris Lattner
372dda8881
This is the first major step of implementing PR1226. We now successfully
...
scalarrepl things down to elements, but mem2reg can't promote elements that
are memset/memcpy'd. Until then, the code is disabled "0 &&".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34924 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 07:52:57 +00:00
Jeff Cohen
413bc8262e
Ensure 64-bit correctness.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34923 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 05:45:08 +00:00
Jeff Cohen
0a18267248
Implement memoryLimit on Windows.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34922 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 05:22:08 +00:00
Jeff Cohen
f15bd1b9c6
Elminate tabs and improve comments.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34921 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 00:46:22 +00:00
Chris Lattner
3c69849696
fix a subtle bug that caused an MSVC warning. Thanks to Jeffc for pointing this out.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34920 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 00:11:19 +00:00
Chris Lattner
783ccdb5c4
Add some simplifications for demanded bits, this allows instcombine to turn:
...
define i64 @test(i64 %A, i32 %B) {
%tmp12 = zext i32 %B to i64 ; <i64> [#uses=1]
%tmp3 = shl i64 %tmp12, 32 ; <i64> [#uses=1]
%tmp5 = add i64 %tmp3, %A ; <i64> [#uses=1]
%tmp6 = and i64 %tmp5, 123 ; <i64> [#uses=1]
ret i64 %tmp6
}
into:
define i64 @test(i64 %A, i32 %B) {
%tmp6 = and i64 %A, 123 ; <i64> [#uses=1]
ret i64 %tmp6
}
This implements Transforms/InstCombine/add2.ll:test1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34919 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 00:02:29 +00:00
Chris Lattner
bc62f24a8c
new testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 00:01:38 +00:00
Jeff Cohen
ca5183d445
Unbreak VC++ build.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34917 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 00:00:42 +00:00
Chris Lattner
f298fd0428
add a getSignBit method, elimiante virtual method from getBitMask()
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34916 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 23:33:19 +00:00
Chris Lattner
82a60eca8f
fix 80 col violations, mark arrays static
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34915 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 23:33:03 +00:00
Chris Lattner
d5fa214729
simplify some code
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34914 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 23:16:36 +00:00
Chris Lattner
b654176cb4
fold away addc nodes when we know there cannot be a carry-out.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:40:38 +00:00
Chris Lattner
55e34eb317
add a new node
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34912 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:40:06 +00:00
Chris Lattner
53546d8ab4
new testcase, corresponds to:
...
long long test(long long A, unsigned B) {
return (A + ((long long)B << 32));
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34911 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:39:47 +00:00
Chris Lattner
bcf2484450
generalize
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34910 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:08:45 +00:00
Chris Lattner
91153686f0
canonicalize constants to the RHS of addc/adde. If nothing uses the carry out of
...
addc, turn it into add.
This allows us to compile:
long long test(long long A, unsigned B) {
return (A + ((long long)B << 32)) & 123;
}
into:
_test:
movl $123, %eax
andl 4(%esp), %eax
xorl %edx, %edx
ret
instead of:
_test:
xorl %edx, %edx
movl %edx, %eax
addl 4(%esp), %eax ;; add of zero
andl $123, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34909 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:03:15 +00:00
Chris Lattner
175415e116
eliminate some ops if they have an undef RHS
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34908 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 20:01:46 +00:00
Chris Lattner
8f3acf87a2
fix typo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34906 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 06:36:24 +00:00
Chris Lattner
569bdc7bb7
add missing braces
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34905 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 06:13:52 +00:00
Chris Lattner
57939df2eb
minor cleanups
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34904 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 04:50:21 +00:00
Reid Spencer
d7f3de655b
Remove unneeded header file.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34903 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 04:41:04 +00:00
Chris Lattner
f964f321eb
Speed up -instcombine by 20% by avoiding a particularly expensive passmgr call.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34902 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 04:27:24 +00:00
Chris Lattner
55091782c1
switch MarkAliveBlocks over to using SmallPtrSet instead of std::set, speeding
...
up simplifycfg by 20%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34901 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 04:20:48 +00:00
Chris Lattner
b1f5d8bf6f
Speed up Loop::isLCSSAForm by using a hash table instead of a sorted vector.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34900 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 04:06:39 +00:00
Chris Lattner
ab8fea5283
add iterator range version of ctor.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34899 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 04:04:43 +00:00
Chris Lattner
9f3d738866
make better use of LCSSA information in RewriteLoopExitValues. Before, we
...
would scan the entire loop body, then scan all users of instructions in the
loop, looking for users outside the loop. Now, since we know that the
loop is in LCSSA form, we know that any users outside the loop will be LCSSA
phi nodes. Just scan them.
This speeds up indvars significantly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 03:43:23 +00:00
Reid Spencer
0797605204
Guard further against APInt operations with operands of unequal bit width.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34897 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 01:25:35 +00:00
Chris Lattner
9caed5440d
Implement PR1179/PR1232 and test/Transforms/IndVarsSimplify/loop_evaluate_[234].ll
...
This makes -indvars require and use LCSSA, updating it as appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34896 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 01:00:28 +00:00
Chris Lattner
2fbdd6ba02
New testcases for PR1179/PR1232.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34895 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 00:54:06 +00:00
Reid Spencer
12cabda941
Get the version number for the LLVM from the autoconf/configure.ac file
...
when building the documentation for the web site.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34894 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 00:45:50 +00:00
Chris Lattner
8b2d42c949
Fix CodeGen/Generic/fpowi-promote.ll and PR1239
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34893 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 23:43:21 +00:00
Chris Lattner
4f263a00bf
New testcase for PR1239
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34892 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 23:42:50 +00:00