1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
Commit Graph

36273 Commits

Author SHA1 Message Date
Chris Lattner
ed75a9c636 remove some old hacky code that tried to infer whether a store
occured in a pattern, but failed miserably.  The new code works for
any instruction that has a store in its pattern, including all the 
x86 mem op mem instructions.

The only target-independent code that uses this is branch folding,
so this won't change anything in practice.

llvm-svn: 45648
2008-01-06 02:16:26 +00:00
Chris Lattner
51500436de rearrange some code to allow inferring instr info from the pattern of the instr, but don't do so yet.
llvm-svn: 45647
2008-01-06 01:53:37 +00:00
Chris Lattner
7414f541ca improve const correctness.
llvm-svn: 45646
2008-01-06 01:52:22 +00:00
Chris Lattner
e9f0c9b6f9 Split the impl of CodeGenInstruction out to its own .cpp file, add a getName() accessor.
llvm-svn: 45645
2008-01-06 01:35:39 +00:00
Chris Lattner
e0f76407f9 final cleanups.
llvm-svn: 45644
2008-01-06 01:21:51 +00:00
Chris Lattner
4eecc7c085 further simplifications and cleanup
llvm-svn: 45643
2008-01-06 01:20:13 +00:00
Chris Lattner
1d89a5f45d simplify some code
llvm-svn: 45642
2008-01-06 01:12:44 +00:00
Chris Lattner
1a15091e2d rename CodegenDAGPatterns -> CodeGenDAGPatterns
llvm-svn: 45641
2008-01-06 01:10:31 +00:00
Chris Lattner
5675305d1a split enum emission out from InstrInfoEmitter into it's own tblgen backend.
llvm-svn: 45640
2008-01-06 00:49:05 +00:00
Chris Lattner
95fa0c3c8d fix build on case sensitive file systems.
llvm-svn: 45639
2008-01-05 23:37:52 +00:00
Bill Wendling
703a1fc174 Fix comment.
llvm-svn: 45638
2008-01-05 23:30:51 +00:00
Chris Lattner
60aa495a41 make this build with newer gcc's
llvm-svn: 45637
2008-01-05 23:29:51 +00:00
Chris Lattner
e61657979a now that computing CodegenDAGPatterns doesn't implicitly print stuff
out, DAGISelEmitter can compute it in its ctor, which simplifies some code.

Now we can use CodegenDAGPatterns in other parts of tblgen that want access
to dag pattern info, woo!

llvm-svn: 45636
2008-01-05 22:58:54 +00:00
Chris Lattner
521466d0d1 move Node Transformation printing from CodeGenDAGPatterns -> DAGISelEmitter.
The only difference in output is that we now print them in alphabetical 
order instead of reverse alphabetical order.

llvm-svn: 45635
2008-01-05 22:54:53 +00:00
Chris Lattner
2fb8b5aaf9 move predicate printing code from CodeGenDAGPatterns -> DAGISelEmitter.
llvm-svn: 45634
2008-01-05 22:43:57 +00:00
Chris Lattner
a66efc2de9 fix a fixme by improving const correctness.
llvm-svn: 45633
2008-01-05 22:30:17 +00:00
Chris Lattner
3cd393b5ab change getQualifiedName to be a global function.
Split the pattern parsing code out from the dag isel emitter into it's own file.

No functionality change.

llvm-svn: 45632
2008-01-05 22:25:12 +00:00
Nate Begeman
ff49dc59ff Remove an incorrect optimization that is performed correctly by
the target independent legalizer.

llvm-svn: 45631
2008-01-05 20:51:30 +00:00
Nate Begeman
a6e9de35ae If custom lowering of insert element fails, the result Val will be 0.
Don't overwrite a variable used by the fallthrough code path in this
case.

llvm-svn: 45630
2008-01-05 20:47:37 +00:00
Chris Lattner
9f51583a6a Fix build issue on certain compilers.
llvm-svn: 45629
2008-01-05 20:15:42 +00:00
Gordon Henriksen
f4e137838b Refactoring the x86 and x86-64 calling convention implementations,
unifying the copied algorithms and saving over 500 LOC. There should
be no functionality change, but please test on your favorite x86
target.

llvm-svn: 45627
2008-01-05 16:56:59 +00:00
Bill Wendling
ecf0f85985 Chris and Evan noticed that this check was compleatly fubared. I was
checking that there was a from a global instead of a load from the stub
for a global, which is the one that's safe to hoist.

Consider this program:

volatile char G[100];
int B(char *F, int N) {
  for (; N > 0; --N)
    F[N] = G[N];
}

In static mode, we shouldn't be hoisting the load from G:

$ llc -relocation-model=static -o - a.bc -march=x86 -machine-licm

LBB1_1: # bb.preheader
        leal    -1(%eax), %edx
        testl   %edx, %edx
        movl    $1, %edx
        cmovns  %eax, %edx
        xorl    %esi, %esi
LBB1_2: # bb
        movb    _G(%eax), %bl
        movb    %bl, (%ecx,%eax)

llvm-svn: 45626
2008-01-05 09:18:04 +00:00
Chris Lattner
0d444b96ac The current impl is really trivial, add some comments about how it can be made better.
llvm-svn: 45625
2008-01-05 06:47:58 +00:00
Chris Lattner
9428a7d97f allow sinking to be enabled for the jit
llvm-svn: 45624
2008-01-05 06:14:16 +00:00
Chris Lattner
f1493e7b58 enable sinking and licm of loads from the argument area. I'd like to enable this
for remat, but can't due to an RA bug.

llvm-svn: 45623
2008-01-05 06:10:42 +00:00
Chris Lattner
aad6c09a14 simplify some code by using shorter accessors.
llvm-svn: 45622
2008-01-05 05:28:30 +00:00
Chris Lattner
6e948ea2e6 revert my previous patch.
llvm-svn: 45621
2008-01-05 05:26:26 +00:00
Chris Lattner
86ca5928b5 factor some code better to avoid redundancy between
isReallySideEffectFree and isReallyTriviallyReMaterializable.  Why is a load from
a global considered side-effect-free but not rematable?

llvm-svn: 45620
2008-01-05 05:19:56 +00:00
Chris Lattner
6ad8e32f6b getting the pic base has no side effects.
llvm-svn: 45618
2008-01-05 03:54:32 +00:00
Chris Lattner
9e7943159e don't sink anything with side effects, this makes lots of stuff work, but sinks almost nothing.
llvm-svn: 45617
2008-01-05 02:33:22 +00:00
Evan Cheng
759f389846 X86 JIT PIC jumptable support.
llvm-svn: 45616
2008-01-05 02:26:58 +00:00
Chris Lattner
377c720459 fix a common crash.
llvm-svn: 45614
2008-01-05 01:39:17 +00:00
Chris Lattner
7e1c3aa702 remove a couple more unsafe xforms in the face of overflow.
llvm-svn: 45613
2008-01-05 01:22:42 +00:00
Chris Lattner
983697dfac remove the (x-y) < 0 comparison xform, it miscompiles
things that are not equality comparisons, for example:
   (2147479553+4096)-2147479553 < 0    !=   (2147479553+4096) < 2147479553

llvm-svn: 45612
2008-01-05 01:18:20 +00:00
Owen Anderson
8c8c5906f8 I should not be allowed to commit when sleepy.
llvm-svn: 45608
2008-01-05 00:48:55 +00:00
Owen Anderson
6c7beb1748 Didn't mean to commit this.
llvm-svn: 45607
2008-01-05 00:43:37 +00:00
Owen Anderson
4cce45354c Didn't mean to commit this.
llvm-svn: 45606
2008-01-05 00:42:45 +00:00
Evan Cheng
5b9282f3b5 Combine MovePCtoStack + POP32r into one instruction MOVPC32r so it can be moved if needed.
llvm-svn: 45605
2008-01-05 00:41:47 +00:00
Owen Anderson
2adf8c5533 Move some more functionality from MRegisterInfo to TargetInstrInfo.
llvm-svn: 45603
2008-01-04 23:57:37 +00:00
Bill Wendling
93556af6c4 Don't recalculate the loop info and loop dominators analyses if they're
preserved.

llvm-svn: 45596
2008-01-04 20:54:55 +00:00
Wojciech Matyjewicz
2502769cf3 fix typo
llvm-svn: 45595
2008-01-04 20:04:08 +00:00
Wojciech Matyjewicz
9ec15f974f fix typo
llvm-svn: 45594
2008-01-04 20:02:18 +00:00
Duncan Sands
8a7547d26f Testcase with non-integer "bitfields" (in quotes,
since they didn't actually need to be bitfields,
though they are marked as such).

llvm-svn: 45588
2008-01-04 17:31:56 +00:00
Gordon Henriksen
bc89f424b7 Fix a typo in llvm.mli noticed by Alain Frisch.
llvm-svn: 45585
2008-01-04 13:21:02 +00:00
Duncan Sands
93c581f2a8 Testcase for PR1386.
llvm-svn: 45583
2008-01-04 13:15:39 +00:00
Bill Wendling
9763bb186b doc_code-ify some code in this doc.
llvm-svn: 45581
2008-01-04 12:04:32 +00:00
Gordon Henriksen
35d9fcb448 Quote a path in the Ocaml makefile which is likely to include spaces on Windows.
llvm-svn: 45580
2008-01-04 11:55:57 +00:00
Evan Cheng
6dbcca7903 Unbreak tailcall opt in JIT.
llvm-svn: 45576
2008-01-04 10:50:28 +00:00
Evan Cheng
7322e4dec4 X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
llvm-svn: 45575
2008-01-04 10:46:51 +00:00
Bill Wendling
4f3a9df125 80-column violations.
llvm-svn: 45574
2008-01-04 08:59:18 +00:00