1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

30566 Commits

Author SHA1 Message Date
Reid Spencer
db1c09aef1 Remove an unnecessary if statement and adjust indentation.
llvm-svn: 34939
2007-03-05 23:36:13 +00:00
Bill Wendling
c52174dee3 Add the emms intrinsic for MMX support.
llvm-svn: 34938
2007-03-05 23:09:45 +00:00
Reid Spencer
5ecf7f6214 Document the use of getValueType() more accurately, specifically explain
that the instruction opcode is added to the InstructionVal value and the
consequences of that.

llvm-svn: 34937
2007-03-05 23:06:32 +00:00
Devang Patel
79495d839e 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.

llvm-svn: 34936
2007-03-05 22:57:49 +00:00
Reid Spencer
649c1d51a2 Add a test case for a particular udiv/select transform.
llvm-svn: 34935
2007-03-05 22:51:08 +00:00
Devang Patel
6668a341ae Avoid constructing std::strings unless pass debugging is ON.
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Devang Patel
ca90313b39 Account for time consumed by releaseMemory() properly.
llvm-svn: 34932
2007-03-05 18:20:51 +00:00
Lauro Ramos Venancio
3f855f6a54 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.

llvm-svn: 34931
2007-03-05 17:59:58 +00:00
Jeff Cohen
84d84f7381 The hack won't work on VS 2005, and it might not be needed anyway.
llvm-svn: 34930
2007-03-05 17:22:33 +00:00
Zhou Sheng
b6d1ac8682 Correct the calculation in APInt::logBase2().
llvm-svn: 34929
2007-03-05 16:42:58 +00:00
Duncan Sands
ceef2090b3 Credit self for Ada front-end.
llvm-svn: 34928
2007-03-05 09:21:11 +00:00
Duncan Sands
5498a32001 Testcase for handling of static constant declarations in EmitBIND_EXPR.
llvm-svn: 34927
2007-03-05 08:39:58 +00:00
Duncan Sands
8aee7f8a56 Testcase causing the Ada front-end to create bogus constructor fields.
llvm-svn: 34926
2007-03-05 08:34:35 +00:00
Duncan Sands
964b80ff60 New directory for Ada testcases. Test handling of NON_LVALUE_EXPR.
llvm-svn: 34925
2007-03-05 08:20:48 +00:00
Chris Lattner
b0de2b2a9c 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 &&".

llvm-svn: 34924
2007-03-05 07:52:57 +00:00
Jeff Cohen
01cb8d6857 Ensure 64-bit correctness.
llvm-svn: 34923
2007-03-05 05:45:08 +00:00
Jeff Cohen
5506bc49f9 Implement memoryLimit on Windows.
llvm-svn: 34922
2007-03-05 05:22:08 +00:00
Jeff Cohen
b58af23ff3 Elminate tabs and improve comments.
llvm-svn: 34921
2007-03-05 00:46:22 +00:00
Chris Lattner
4dfdbab24b fix a subtle bug that caused an MSVC warning. Thanks to Jeffc for pointing this out.
llvm-svn: 34920
2007-03-05 00:11:19 +00:00
Chris Lattner
4fadd9defa 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

llvm-svn: 34919
2007-03-05 00:02:29 +00:00
Chris Lattner
f05abaca7c new testcase
llvm-svn: 34918
2007-03-05 00:01:38 +00:00
Jeff Cohen
98c99a3a02 Unbreak VC++ build.
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Chris Lattner
7fdddda045 add a getSignBit method, elimiante virtual method from getBitMask()
llvm-svn: 34916
2007-03-04 23:33:19 +00:00
Chris Lattner
69aafa4be8 fix 80 col violations, mark arrays static
llvm-svn: 34915
2007-03-04 23:33:03 +00:00
Chris Lattner
0036009167 simplify some code
llvm-svn: 34914
2007-03-04 23:16:36 +00:00
Chris Lattner
8c7d418eaf fold away addc nodes when we know there cannot be a carry-out.
llvm-svn: 34913
2007-03-04 20:40:38 +00:00
Chris Lattner
295b3d69b1 add a new node
llvm-svn: 34912
2007-03-04 20:40:06 +00:00
Chris Lattner
fc3b6903e3 new testcase, corresponds to:
long long test(long long A, unsigned B) {
  return (A + ((long long)B << 32));
}

llvm-svn: 34911
2007-03-04 20:39:47 +00:00
Chris Lattner
7021449d8b generalize
llvm-svn: 34910
2007-03-04 20:08:45 +00:00
Chris Lattner
06e4ea2b21 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

llvm-svn: 34909
2007-03-04 20:03:15 +00:00
Chris Lattner
bac1a46d92 eliminate some ops if they have an undef RHS
llvm-svn: 34908
2007-03-04 20:01:46 +00:00
Chris Lattner
241e2e2e3d fix typo
llvm-svn: 34906
2007-03-04 06:36:24 +00:00
Chris Lattner
6d7701714e add missing braces
llvm-svn: 34905
2007-03-04 06:13:52 +00:00
Chris Lattner
758a83d1b0 minor cleanups
llvm-svn: 34904
2007-03-04 04:50:21 +00:00
Reid Spencer
d3481fbeec Remove unneeded header file.
llvm-svn: 34903
2007-03-04 04:41:04 +00:00
Chris Lattner
de2b4322ff Speed up -instcombine by 20% by avoiding a particularly expensive passmgr call.
llvm-svn: 34902
2007-03-04 04:27:24 +00:00
Chris Lattner
f2304552f7 switch MarkAliveBlocks over to using SmallPtrSet instead of std::set, speeding
up simplifycfg by 20%

llvm-svn: 34901
2007-03-04 04:20:48 +00:00
Chris Lattner
dec6a90a00 Speed up Loop::isLCSSAForm by using a hash table instead of a sorted vector.
llvm-svn: 34900
2007-03-04 04:06:39 +00:00
Chris Lattner
2510829eba add iterator range version of ctor.
llvm-svn: 34899
2007-03-04 04:04:43 +00:00
Chris Lattner
4d48389d2d 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.

llvm-svn: 34898
2007-03-04 03:43:23 +00:00
Reid Spencer
17000a40e2 Guard further against APInt operations with operands of unequal bit width.
llvm-svn: 34897
2007-03-04 01:25:35 +00:00
Chris Lattner
519ed087bb Implement PR1179/PR1232 and test/Transforms/IndVarsSimplify/loop_evaluate_[234].ll
This makes -indvars require and use LCSSA, updating it as appropriate.

llvm-svn: 34896
2007-03-04 01:00:28 +00:00
Chris Lattner
f5eeb38be5 New testcases for PR1179/PR1232.
llvm-svn: 34895
2007-03-04 00:54:06 +00:00
Reid Spencer
811c8dccf1 Get the version number for the LLVM from the autoconf/configure.ac file
when building the documentation for the web site.

llvm-svn: 34894
2007-03-04 00:45:50 +00:00
Chris Lattner
9c1328fdbb Fix CodeGen/Generic/fpowi-promote.ll and PR1239
llvm-svn: 34893
2007-03-03 23:43:21 +00:00
Chris Lattner
e6d3ae4f2c New testcase for PR1239
llvm-svn: 34892
2007-03-03 23:42:50 +00:00
Chris Lattner
f45fa39069 Make RewriteLoopExitValues far less nested by using continue in the loop
llvm-svn: 34891
2007-03-03 22:48:48 +00:00
Chris Lattner
4275ffd6ff Add an expand action for ISD label which just deletes the label.
This "fixes" PR1238.

llvm-svn: 34890
2007-03-03 19:21:38 +00:00
Reid Spencer
4ab5a02fb1 Remove unnecessary #include.
llvm-svn: 34889
2007-03-03 18:29:16 +00:00
Reid Spencer
49931e1841 1. Handle errors around the ModuleProvider. This is necessary since it is
reading bytecode.
2. The interpreter can delete the ModuleProvider and replace it with
   another so don't depend on it being around after the EE is created.
3. Don't just run llvm_shutdown on exit but actually delete the EE as well.
   This cleans up a vast amount of memory (but not all) that EE retained
   through exit.

llvm-svn: 34888
2007-03-03 18:21:44 +00:00