Chris Lattner
d57638c4a7
Fix compatibility with MSVC, patch by Morten Ofstad
...
llvm-svn: 17218
2004-10-25 18:45:16 +00:00
Chris Lattner
6180881673
Do not use variable sized arrays in C++, they are non-portable. Patch
...
contributed by Morten Ofstad
llvm-svn: 17217
2004-10-25 18:44:14 +00:00
John Criswell
7eeed938bf
Removed dead method, printPHICopiesForSuccessors().
...
llvm-svn: 17216
2004-10-25 18:41:50 +00:00
Chris Lattner
111c3e827e
Patch to support MSVC better, contributed by Morten Ofstad
...
llvm-svn: 17215
2004-10-25 18:40:47 +00:00
Chris Lattner
43df507fef
Patch to support MSVC, contributed by Morten Ofstad
...
llvm-svn: 17214
2004-10-25 18:40:08 +00:00
John Criswell
a564e9e0ba
Modified switch generation so that only the phi values associated with the
...
destination basic block are copied.
llvm-svn: 17212
2004-10-25 18:30:09 +00:00
Nate Begeman
74b7c1f3e0
Implement more complete and correct codegen for bitfield inserts, as tested
...
by the recently committed rlwimi.ll test file. Also commit initial code
for bitfield extract, although it is turned off until fully debugged.
llvm-svn: 17207
2004-10-24 10:33:30 +00:00
Chris Lattner
3ff9289476
Fix the previous bug the correct way. This fixes ptrdist/bc
...
llvm-svn: 17201
2004-10-24 04:27:59 +00:00
Alkis Evlogimenos
ba28dc8c54
Make this actually work.
...
llvm-svn: 17199
2004-10-24 03:02:16 +00:00
Alkis Evlogimenos
da5de05b9b
Add ConstantExpr::getSizeOf(Type*).
...
llvm-svn: 17196
2004-10-24 01:41:10 +00:00
Misha Brukman
9ce0da9e90
* Correctly handle the MovePCtoLR pseudo-instr with a bl to next instr
...
* Stop the confusion of using rv and Addr for global addresses: just use rv
llvm-svn: 17195
2004-10-23 23:47:34 +00:00
Misha Brukman
f1f6270708
Add BA, BL, and BLA opcodes
...
llvm-svn: 17193
2004-10-23 20:29:24 +00:00
Misha Brukman
421c3c1ec4
* Do not emit IMPLICIT_DEF pseudo-instructions
...
* Convert register numbers from their opcode value to the real value, e.g.
PPC::R1 => 1 and PPC::F1 => 1
* Add correct handling of loading of global values which are PC-relative --
implement ha16() and lo16()
llvm-svn: 17190
2004-10-23 18:28:01 +00:00
Misha Brukman
15b0fb5678
DForm_1, particularly used by store instructions, needs the immediate operand to
...
be listed second as that is how the instructions are usually created (and is the
correct asm syntax) so that it's assembled correctly from its constituents
llvm-svn: 17183
2004-10-23 06:08:38 +00:00
Misha Brukman
e882d30aa1
Fix the SPR field for MTLR, MFLR, MTCTR, and MFCTR instructions.
...
The decimal value given in the manual (8 or 9) really needs to be multiplied by
a factor of 32 because of the group of 5 zero bits after the register code.
llvm-svn: 17182
2004-10-23 06:05:49 +00:00
Misha Brukman
55a3ccd035
The value of the XO field for MFLR and MFCTR is 339, not 399
...
llvm-svn: 17181
2004-10-23 05:38:55 +00:00
Misha Brukman
101d5d62d5
Remove extraneous blank line
...
llvm-svn: 17180
2004-10-23 04:59:22 +00:00
Misha Brukman
cea2e46821
Align function arguments in function headers
...
llvm-svn: 17178
2004-10-23 04:58:32 +00:00
Chris Lattner
46131bd16f
Fix a bug that Brian brought to my attention. This corrects:
...
Assembler/2004-10-22-BCWriterUndefBug.llx
llvm-svn: 17177
2004-10-23 03:10:23 +00:00
Nate Begeman
6cadac8f43
Kill casts from integer types to unsigned byte, when the cast was only used
...
as the shift amount operand to a shift instruction. This was causing us to
emit unnecessary clear operations for code such as:
int foo(int x) { return 1 << x; }
llvm-svn: 17175
2004-10-23 00:50:23 +00:00
Misha Brukman
37a7102ccb
Use cleaner quoting and eliminate blank space
...
llvm-svn: 17174
2004-10-22 23:35:57 +00:00
Reid Spencer
4755617619
Clean up the output from this makefile so its not verbose.
...
llvm-svn: 17173
2004-10-22 23:24:39 +00:00
Misha Brukman
e60a3fb063
Adjust rules for building .inc files due to Reid's changes of Makefile.rules
...
llvm-svn: 17169
2004-10-22 22:16:24 +00:00
Reid Spencer
30d8baea8d
Adjust to changes in Makefile.rules
...
llvm-svn: 17167
2004-10-22 21:02:08 +00:00
Reid Spencer
fad217c847
Eliminate compilation warning on uninitialized variable.
...
llvm-svn: 17163
2004-10-22 16:10:39 +00:00
Chris Lattner
fe9abf92de
*** empty log message ***
...
llvm-svn: 17161
2004-10-22 06:43:28 +00:00
Chris Lattner
5c3c21e10a
Fix a bug Nate noticed, where we miscompiled a simple testcase
...
llvm-svn: 17157
2004-10-22 04:53:16 +00:00
Reid Spencer
c1c320c335
We won't use automake
...
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Misha Brukman
a6ecf271db
Remove debug code emitter from the JIT
...
llvm-svn: 17151
2004-10-21 03:07:38 +00:00
Alkis Evlogimenos
757cc0e84c
Make this compile.
...
llvm-svn: 17150
2004-10-21 02:44:16 +00:00
Misha Brukman
2beb63a65a
* Added basic support for JITing functions, basic blocks, instruction encoding,
...
including registers, constants, and partial support for global addresses
* The JIT is disabled by default to allow building llvm-gcc, which wants to test
running programs during configure
llvm-svn: 17149
2004-10-21 01:42:02 +00:00
Nate Begeman
86b5f8075c
Don't clear or sign extend bool->int. This fires a few dozen times on the test suite
...
llvm-svn: 17147
2004-10-20 21:55:41 +00:00
Brian Gaeke
c9d8b4d45c
Explain what this pass does.
...
llvm-svn: 17146
2004-10-20 19:38:58 +00:00
John Criswell
85b380582e
Small performance improvement in generated C code:
...
Instead of unconditionally copying all phi node values into temporaries for
all successor blocks, generate code that will determine what successor
block will be called and then copy only those phi node values needed by
the successor block.
This seems to cut down namd execution time from being 8% higher than GCC to
4% higher than GCC.
llvm-svn: 17144
2004-10-20 14:38:39 +00:00
Misha Brukman
e2ada0413e
* Add baseline structural JIT code, but disable the JIT to allow llvm-gcc builds
...
- Support added for functions, basic blocks, constant pool, constants,
registers, and some basic support for globals, all untested
* Turn assert()s into abort()s so that unimplemented functions fail in release
llvm-svn: 17143
2004-10-19 19:49:42 +00:00
Chris Lattner
257b284038
Hrm, some people complain when the compiler cheerfully tells them what it's
...
doing... I guess they're right.
llvm-svn: 17142
2004-10-19 06:33:16 +00:00
Misha Brukman
648ad57b85
Fix some grammar
...
llvm-svn: 17141
2004-10-19 05:55:54 +00:00
Brian Gaeke
f3499acc16
Simplify mapping info generation. In particular, the LLVM-to-MachineInstr map
...
is no longer emitted, and we do not reference any MachineCodeForInstruction
information.
llvm-svn: 17138
2004-10-19 05:15:21 +00:00
Reid Spencer
6a11a75f31
Initial automake generated Makefile template
...
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Nate Begeman
b18121e6a9
Initial implementation of the strength reduction for GEP instructions in
...
loops. This optimization is not turned on by default yet, but may be run
with the opt tool's -loop-reduce flag. There are many FIXMEs listed in the
code that will make it far more applicable to a wide range of code, but you
have to start somewhere :)
This limited version currently triggers on the following tests in the
MultiSource directory:
pcompress2: 7 times
cfrac: 5 times
anagram: 2 times
ks: 6 times
yacr2: 2 times
llvm-svn: 17134
2004-10-18 21:08:22 +00:00
Misha Brukman
22cf52374e
AIX does not have mkdtemp() so emulate its behavior using mktemp() and mkdir()
...
llvm-svn: 17131
2004-10-18 17:39:45 +00:00
Chris Lattner
fbc070bfdc
Improve compatibility with VC++, patch contributed by Morten Ofstad!
...
llvm-svn: 17126
2004-10-18 15:54:17 +00:00
Chris Lattner
88a8a329c3
Get this file compiling with VC++, patch contributed by Morten Ofstad. Thanks Morten!
...
llvm-svn: 17125
2004-10-18 15:43:46 +00:00
Reid Spencer
ce0783318b
Correction to allow compilation with Visual C++.
...
Patch contributed by Morten Ofstad. Thanks Morten!
llvm-svn: 17123
2004-10-18 14:38:48 +00:00
Chris Lattner
5edb2f32d0
Simplify code by deleting instructions that preceed unreachable instructions.
...
Simplify code by simplifying terminators that branch to blocks that start
with an unreachable instruction.
llvm-svn: 17116
2004-10-18 04:07:22 +00:00
Chris Lattner
a67dd32004
Turn store -> null/undef into the LLVM unreachable instruction! This simple
...
change hacks off 10K of bytecode from perlbmk (.5%) even though the front-end
is not generating them yet and we are not optimizing the resultant code.
This isn't too bad.
llvm-svn: 17111
2004-10-18 03:00:50 +00:00
Chris Lattner
8ba9ec9bbb
Turn things with obviously undefined semantics into 'store -> null'
...
llvm-svn: 17110
2004-10-18 02:59:09 +00:00
Chris Lattner
3b92f17165
My friend the invoke instruction does not dominate all basic blocks if it
...
occurs in the entry node of a function
llvm-svn: 17109
2004-10-18 01:48:31 +00:00
Chris Lattner
34ae670706
Fix a bug that occurs when the constant value is the result of an invoke. In
...
particular, invoke ret values are only live in the normal dest of the invoke
not in the unwind dest.
llvm-svn: 17108
2004-10-18 01:21:17 +00:00
Chris Lattner
53058663aa
Print a semicolon for the unreacahble instruction. This fixes problems
...
where C requires semicolons in some cases to indicate null statements.
llvm-svn: 17107
2004-10-17 23:49:11 +00:00