Reid Spencer
5f2b79ec4c
Use the -emit-llvm switch to generate LLVM assembly that can be parsed
...
by the test case.
llvm-svn: 30654
2006-09-28 21:36:21 +00:00
Reid Spencer
4fde7faeb0
Add a test case for PR902.
...
llvm-svn: 30653
2006-09-28 21:20:05 +00:00
Chris Lattner
78370606d0
Shift amounts are always 32-bits, even in 64-bit mode. This fixes
...
CodeGen/PowerPC/2006-09-28-shift_64.ll
llvm-svn: 30652
2006-09-28 20:48:45 +00:00
Chris Lattner
a3542a82be
new testcase
...
llvm-svn: 30651
2006-09-28 20:48:17 +00:00
Reid Spencer
309080abbc
Fix PR902:
...
Errors are generated with the YYERROR macro which can only be called from
a production (inside yyparse) because of the goto statement in the macro.
This lead to several situations where GEN_ERROR was not called but
GenerateError was used instead (because it doesn't use YYERROR). However,
in such situations, catching the error much later (e.g. at the end of
the production) is not sufficient because LLVM can assert on invalid data
before the end of the production is reached. The solution is to ensure that
the CHECK_FOR_ERROR macro (which invokes YYERROR if there's an error) is
used as soon as possible after a call to GenerateError has been made.
llvm-svn: 30650
2006-09-28 19:28:24 +00:00
Chris Lattner
83fb402291
Testcase for PR924
...
llvm-svn: 30649
2006-09-28 18:58:02 +00:00
Evan Cheng
bcf1b4120f
TargetRegisterClass specifies the desired spill alignment. However, it cannot be honored if stack alignment is smaller.
...
llvm-svn: 30648
2006-09-28 18:52:32 +00:00
Jim Laskey
8f1510cfd3
Fix search file for -release.
...
llvm-svn: 30647
2006-09-28 18:45:11 +00:00
Jim Laskey
68722b7e08
Add support for -release-asserts.
...
llvm-svn: 30646
2006-09-28 17:49:20 +00:00
Reid Spencer
48cf6a6f21
Provide a gdb usage fix provided by Zhongzing Xu.
...
llvm-svn: 30645
2006-09-28 16:53:47 +00:00
Bill Wendling
5d409822d6
"Once more into the breach, dear friends, once more, or fill the wall up
...
with our English dead."
No! Really! Serious this time...It was how the vreg uses were being
adjusted that was causing hte Olden tests to fail. I corrected this and
the Olden and Regression tests all passed.
llvm-svn: 30644
2006-09-28 07:10:24 +00:00
Chris Lattner
a9caf95591
refactor critical edge breaking out into the SplitCritEdgesForPHIConstants method.
...
This is a baby step towards fixing PR925.
llvm-svn: 30643
2006-09-28 06:17:10 +00:00
Chris Lattner
3cbd1604f8
add a note about a general improvement to the code generator
...
llvm-svn: 30642
2006-09-28 06:01:17 +00:00
Chris Lattner
c7d3195254
remove reference to dead method
...
llvm-svn: 30641
2006-09-28 00:38:19 +00:00
Chris Lattner
b044ab2b82
remove dead method
...
llvm-svn: 30640
2006-09-28 00:37:43 +00:00
Chris Lattner
69edc98b74
Use the new ManagedStatic class to explicitly manage static variables, eliminating static ctors/dtors
...
llvm-svn: 30639
2006-09-28 00:35:06 +00:00
Chris Lattner
9daff49ebb
new helper class to provide more explicit management of static ctor/dtors.
...
llvm-svn: 30638
2006-09-28 00:31:55 +00:00
Chris Lattner
764caf6129
re-re-revert this, back to the right revision. It currently breaks bisort/mst
...
in olden among others.
llvm-svn: 30637
2006-09-28 00:11:54 +00:00
Evan Cheng
d31f55c236
PEI now place callee save spills closest to the address pointed to by the
...
incoming stack. This allows X86 backend to use push / pop in epilogue /
prologue.
llvm-svn: 30636
2006-09-28 00:10:27 +00:00
Evan Cheng
17a8d08dba
- Added a hook processFunctionBeforeCalleeSaveScn(). This is called by PEI just
...
before it determines which callee-save registers are to be spilled. This allows
the target to make changes such as forcing certain physical registers to be
spilled.
- Modified comments. It's important to note the order of registers in the array
returns by getCalleeSaveRegs() determines the order of callee save spill code.
llvm-svn: 30635
2006-09-28 00:07:19 +00:00
Chris Lattner
9f7d0d1dc5
re-revert this patch, bisort and mst are still broken in Olden.
...
llvm-svn: 30634
2006-09-28 00:04:21 +00:00
Bill Wendling
1f29e6c5c5
Reapplying this patch. With the newest commits, the error in Olden/bisort
...
has disappeared.
llvm-svn: 30633
2006-09-27 22:37:35 +00:00
Chris Lattner
fc36039f86
silence warnings in release build
...
llvm-svn: 30631
2006-09-27 18:29:38 +00:00
Devang Patel
0a79537341
Fix DFS walk.
...
Fix http://llvm.org/bugs/show_bug.cgi?id=923
llvm-svn: 30630
2006-09-27 17:18:05 +00:00
Chris Lattner
5f6c93701b
Temporarily revert this. This breaks Olden/bisort on PPC
...
llvm-svn: 30628
2006-09-27 16:59:16 +00:00
Jim Laskey
3bbf884855
Make sure C++ protection shows up in debug info
...
llvm-svn: 30626
2006-09-27 16:55:19 +00:00
Chris Lattner
5d751b4a3a
This:
...
AggregateString += "\0\0";
Doesn't add two nuls to the AggregateString (for obvious reasons), which
broke the asmprinter when the first character of an asm string was not
literal text.
llvm-svn: 30625
2006-09-27 16:44:09 +00:00
Bill Wendling
0a7f617a6c
PR878: Instead of calculating the vreg to PHI use count everytime we get
...
a function, do it up front in linear time (going through all of the
instructions once). We create a map out of them. Then it's no problem to
use the information in it during elimination...
llvm-svn: 30624
2006-09-27 09:04:15 +00:00
Chris Lattner
e03ca2ca4a
set DEBUG_TYPE right
...
llvm-svn: 30623
2006-09-27 04:58:23 +00:00
Devang Patel
ce73ac3089
Add http://llvm.org/bugs/show_bug.cgi?id=923 test case.
...
llvm-svn: 30622
2006-09-27 02:58:44 +00:00
Chris Lattner
67f8cc51f4
Use abstract private/comment directives, to increase portability to ppc/linux
...
llvm-svn: 30621
2006-09-27 02:55:21 +00:00
Chris Lattner
30b4708df2
Add support for ${:private} which prints "L" on darwin.
...
llvm-svn: 30620
2006-09-27 00:06:07 +00:00
Chris Lattner
a32814b033
Add support for ${:comment}, which expands to the current target's comment
...
character, and ${:uid} which expands to a unique ID for the MachineInstr.
More can be added if/when they are needed.
llvm-svn: 30619
2006-09-26 23:59:50 +00:00
Chris Lattner
8d21485660
Actually, name the method PrintSpecial to match other stuff in AsmPrinter.h
...
llvm-svn: 30618
2006-09-26 23:47:10 +00:00
Chris Lattner
5fd0154523
Add support for ${:foo} syntax, where "foo" is passed into "printSpecial" and
...
has no associated operand. This is useful for portably encoding stuff like
the comment character into an asm string.
llvm-svn: 30617
2006-09-26 23:45:08 +00:00
Evan Cheng
5405c06737
Rename function. It's determining which callee-save registers to save.
...
llvm-svn: 30616
2006-09-26 22:29:31 +00:00
Andrew Lenharth
c19ef92403
Comments on JumpTableness
...
llvm-svn: 30615
2006-09-26 20:02:30 +00:00
Jim Laskey
60832693a7
Load chain check is not needed
...
llvm-svn: 30613
2006-09-26 17:44:58 +00:00
Jim Laskey
dde51671e5
Chain can be any operand
...
llvm-svn: 30611
2006-09-26 09:32:41 +00:00
Jim Laskey
5f3e0af9d0
Wrong size for load
...
llvm-svn: 30610
2006-09-26 08:14:06 +00:00
Jim Laskey
b4a864d533
Can't move a load node if it's chain is not used.
...
llvm-svn: 30609
2006-09-26 07:37:42 +00:00
Chris Lattner
104aa5dbc1
Various random and minor code cleanups.
...
llvm-svn: 30608
2006-09-26 03:57:53 +00:00
Chris Lattner
ae7ff8b0c6
test that the no_dead_strip directive is emitted on darwin-x86
...
llvm-svn: 30607
2006-09-26 03:44:20 +00:00
Chris Lattner
9a1e91b107
print the preds of each MBB
...
llvm-svn: 30606
2006-09-26 03:41:59 +00:00
Chris Lattner
ad4e7eb59e
Compile:
...
int x __attribute__((used));
to:
.data
.comm _x,4 ; 'x'
.no_dead_strip _x
on both x86 and ppc darwin targets.
llvm-svn: 30605
2006-09-26 03:39:53 +00:00
Chris Lattner
66af390631
Add support for targets that want to do something with the llvm.used list,
...
because they have an aggressive linker that does dead code stripping.
llvm-svn: 30604
2006-09-26 03:38:18 +00:00
Chris Lattner
991d3997cf
order this properly to avoid warnings in TargetAsmInfo.cpp. Add a comment
...
in a format that matches every other ivars in this class.
llvm-svn: 30603
2006-09-25 22:38:36 +00:00
Jim Laskey
7aa0638aa9
Accidental enable of bad code
...
llvm-svn: 30601
2006-09-25 21:11:32 +00:00
Jim Laskey
b5534e5c28
Fix chain dropping in load and drop unused stores in ret blocks.
...
llvm-svn: 30600
2006-09-25 19:32:58 +00:00
John Criswell
437d9a3fb2
Regression test for PR#922.
...
llvm-svn: 30599
2006-09-25 19:12:01 +00:00
Chris Lattner
f11327daab
more notes
...
llvm-svn: 30598
2006-09-25 17:12:14 +00:00
Jim Laskey
d07be232ba
Core antialiasing for load and store.
...
llvm-svn: 30597
2006-09-25 16:29:54 +00:00
Andrew Lenharth
6d8e227ac7
Fix
...
llvm-svn: 30596
2006-09-25 14:04:53 +00:00
Andrew Lenharth
5e2bacd6be
Fix jump tables to match gcc (and the ABI and whatnot)
...
llvm-svn: 30594
2006-09-24 19:46:56 +00:00
Andrew Lenharth
783a4a9d86
Add support for other relocation bases to jump tables, as well as custom asm directives
...
llvm-svn: 30593
2006-09-24 19:45:58 +00:00
Andrew Lenharth
3cec4952ab
basic jump table test
...
llvm-svn: 30592
2006-09-24 19:42:02 +00:00
Andrew Lenharth
68324f8f85
jump table note
...
llvm-svn: 30591
2006-09-24 13:13:10 +00:00
Evan Cheng
77c0757f8b
PIC jump table entries are always 32-bit. This fixes PIC jump table support on X86-64.
...
llvm-svn: 30590
2006-09-24 05:22:38 +00:00
Nick Lewycky
25587182f3
Enable 'predsimplify' optimization.
...
llvm-svn: 30589
2006-09-24 00:08:16 +00:00
Nick Lewycky
059c79264f
Style changes only. Remove dead code, fix a comment.
...
llvm-svn: 30588
2006-09-23 15:13:08 +00:00
Chris Lattner
6bd6da4097
Be far more careful when splitting a loop header, either to form a preheader
...
or when splitting loops with a common header into multiple loops. In particular
the old code would always insert the preheader before the old loop header. This
is disasterous in cases where the loop hasn't been rotated. For example, it can
produce code like:
.. outside the loop...
jmp LBB1_2 #bb13.outer
LBB1_1: #bb1
movsd 8(%esp,%esi,8), %xmm1
mulsd (%edi), %xmm1
addsd %xmm0, %xmm1
addl $24, %edi
incl %esi
jmp LBB1_3 #bb13
LBB1_2: #bb13.outer
leal (%edx,%eax,8), %edi
pxor %xmm1, %xmm1
xorl %esi, %esi
LBB1_3: #bb13
movapd %xmm1, %xmm0
cmpl $4, %esi
jl LBB1_1 #bb1
Note that the loop body is actually LBB1_1 + LBB1_3, which means that the
loop now contains an uncond branch WITHIN it to jump around the inserted
loop header (LBB1_2). Doh.
This patch changes the preheader insertion code to insert it in the right
spot, producing this code:
... outside the loop, fall into the header ...
LBB1_1: #bb13.outer
leal (%edx,%eax,8), %esi
pxor %xmm0, %xmm0
xorl %edi, %edi
jmp LBB1_3 #bb13
LBB1_2: #bb1
movsd 8(%esp,%edi,8), %xmm0
mulsd (%esi), %xmm0
addsd %xmm1, %xmm0
addl $24, %esi
incl %edi
LBB1_3: #bb13
movapd %xmm0, %xmm1
cmpl $4, %edi
jl LBB1_2 #bb1
Totally crazy, no branch in the loop! :)
llvm-svn: 30587
2006-09-23 08:19:21 +00:00
Chris Lattner
608cd05e3f
Teach UpdateDomInfoForRevectoredPreds to handle revectored preds that are not
...
reachable, making it general purpose enough for use by InsertPreheaderForLoop.
Eliminate custom dominfo updating code in InsertPreheaderForLoop, using
UpdateDomInfoForRevectoredPreds instead.
llvm-svn: 30586
2006-09-23 07:40:52 +00:00
Chris Lattner
e4583e8c2c
remove misleading comment
...
llvm-svn: 30585
2006-09-23 06:09:45 +00:00
Chris Lattner
4091f4690a
add method, correct comment
...
llvm-svn: 30584
2006-09-23 04:03:45 +00:00
Evan Cheng
1da0ab2f58
Delete dead code; fix 80 col violations.
...
llvm-svn: 30583
2006-09-22 21:43:59 +00:00
Rafael Espindola
72d4c070c0
add a note
...
llvm-svn: 30581
2006-09-22 11:36:17 +00:00
Bill Wendling
fc0e612b65
Use "%llvmgxx" instead of "llvm-g++".
...
llvm-svn: 30580
2006-09-22 07:09:01 +00:00
Nate Begeman
9007f5a48d
Testcase for better rotate left and mask support
...
llvm-svn: 30579
2006-09-22 05:49:57 +00:00
Bill Wendling
fe95123f58
Regression testcase for PR855.
...
llvm-svn: 30578
2006-09-22 05:34:25 +00:00
Nate Begeman
d31efd190f
Fold AND and ROTL more often
...
llvm-svn: 30577
2006-09-22 05:01:56 +00:00
Devang Patel
81c9e42bea
remove extra white spaces.
...
llvm-svn: 30576
2006-09-22 01:07:57 +00:00
Devang Patel
0c4e730c9c
Use iterative algorith to assign DFS number. This reduces
...
call stack depth.
llvm-svn: 30575
2006-09-22 01:05:33 +00:00
Chris Lattner
7d3fd4f888
don't allow 'imm' or specific imms, like '1' on the LHS of a binop.
...
This shrinks X86GenDAGISel by ~330 lines.
llvm-svn: 30574
2006-09-21 20:46:13 +00:00
Evan Cheng
449a0c7e33
Make it work for DAG combine of multi-value nodes.
...
llvm-svn: 30573
2006-09-21 19:04:05 +00:00
Chris Lattner
99ae714459
Fit to 80 columns.
...
llvm-svn: 30572
2006-09-21 18:28:27 +00:00
Jim Laskey
35f7eebb49
core corrections
...
llvm-svn: 30570
2006-09-21 17:35:47 +00:00
Devang Patel
5af1651f7d
Use abstract class to facilitate dlopen() interface.
...
llvm-svn: 30569
2006-09-21 17:22:55 +00:00
Jim Laskey
5d19d59017
Basic "in frame" alias analysis.
...
llvm-svn: 30568
2006-09-21 16:28:59 +00:00
Rafael Espindola
7b700e517a
more condition codes
...
llvm-svn: 30567
2006-09-21 13:06:26 +00:00
Rafael Espindola
0c71a5adc8
if a constant can't be an immediate, add it to the constant pool
...
llvm-svn: 30566
2006-09-21 11:29:52 +00:00
Chris Lattner
082db3f9aa
fold (aext (and (trunc x), cst)) -> (and x, cst).
...
llvm-svn: 30561
2006-09-21 06:40:43 +00:00
Chris Lattner
fa9f92cf65
Check the right value type. This fixes 186.crafty on x86
...
llvm-svn: 30560
2006-09-21 06:17:39 +00:00
Chris Lattner
08a8ccaaf1
implemented
...
llvm-svn: 30559
2006-09-21 06:14:54 +00:00
Chris Lattner
8d8a3bf9c9
Compile:
...
int %test(ulong *%tmp) {
%tmp = load ulong* %tmp ; <ulong> [#uses=1]
%tmp.mask = shr ulong %tmp, ubyte 50 ; <ulong> [#uses=1]
%tmp.mask = cast ulong %tmp.mask to ubyte
%tmp2 = and ubyte %tmp.mask, 3 ; <ubyte> [#uses=1]
%tmp2 = cast ubyte %tmp2 to int ; <int> [#uses=1]
ret int %tmp2
}
to:
_test:
movl 4(%esp), %eax
movl 4(%eax), %eax
shrl $18, %eax
andl $3, %eax
ret
instead of:
_test:
movl 4(%esp), %eax
movl 4(%eax), %eax
shrl $18, %eax
# TRUNCATE movb %al, %al
andb $3, %al
movzbl %al, %eax
ret
llvm-svn: 30558
2006-09-21 06:14:31 +00:00
Chris Lattner
a31f0a622b
Generalize (zext (truncate x)) and (sext (truncate x)) folding to work when
...
the src/dst are not the same size. This catches things like "truncate
32-bit X to 8 bits, then zext to 16", which happens a bit on X86.
llvm-svn: 30557
2006-09-21 06:00:20 +00:00
Chris Lattner
1c18c0db79
Fit in 80-cols
...
llvm-svn: 30556
2006-09-21 05:46:00 +00:00
Chris Lattner
51c95cdd82
Fix Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll
...
llvm-svn: 30555
2006-09-21 05:12:20 +00:00
Chris Lattner
6597e053e1
new testcase
...
llvm-svn: 30554
2006-09-21 05:11:01 +00:00
Nick Lewycky
c68bbef874
Fix compile error.
...
llvm-svn: 30553
2006-09-21 02:08:31 +00:00
Nick Lewycky
fde9c308b2
Don't rewrite ConstantExpr::get.
...
llvm-svn: 30552
2006-09-21 01:05:35 +00:00
Nick Lewycky
d74c55f483
Once we're down to "setcc type constant1, constant2", at least come up
...
with the right answer.
llvm-svn: 30550
2006-09-20 23:02:24 +00:00
Anton Korobeynikov
3c5b3df6a0
Adding codegeneration for StdCall & FastCall calling conventions
...
llvm-svn: 30549
2006-09-20 22:03:51 +00:00
Andrew Lenharth
ccdaecc448
Account for pseudo-ops correctly
...
llvm-svn: 30548
2006-09-20 20:08:52 +00:00
Chris Lattner
a81a75c390
The DarwinAsmPrinter need not check for isDarwin. createPPCAsmPrinterPass
...
should create the right asmprinter subclass.
llvm-svn: 30542
2006-09-20 17:12:19 +00:00
Chris Lattner
8597a2fc4e
Wrap some darwin'isms with isDarwin checks.
...
llvm-svn: 30541
2006-09-20 17:07:15 +00:00
Nick Lewycky
cfff1c3f86
Use a total ordering to compare instructions.
...
Fixes infinite loop in resolve().
llvm-svn: 30540
2006-09-20 17:04:01 +00:00
Andrew Lenharth
44cb67af5c
simplify
...
llvm-svn: 30535
2006-09-20 15:37:57 +00:00
Andrew Lenharth
f007f21c8a
catch constants more often
...
llvm-svn: 30534
2006-09-20 15:05:49 +00:00
Andrew Lenharth
b04e899bb4
catch another constant
...
llvm-svn: 30533
2006-09-20 15:04:55 +00:00
Andrew Lenharth
97a4e99aff
clarify with test case
...
llvm-svn: 30531
2006-09-20 14:48:00 +00:00