Chris Lattner [Tue, 17 Feb 2004 03:57:19 +0000 (03:57 +0000)]
Refactor code a bit. No functionality changes, though the comment hints at things to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11515
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Feb 2004 03:03:47 +0000 (03:03 +0000)]
Adjust to recent changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11514
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Feb 2004 03:03:36 +0000 (03:03 +0000)]
Add two missing pieces from last checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11513
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Feb 2004 02:58:36 +0000 (02:58 +0000)]
Rearrange code to eliminate warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11512
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Mon, 16 Feb 2004 23:50:18 +0000 (23:50 +0000)]
Add peephole optimizations for ADD [MEM], IMM8 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11511
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Mon, 16 Feb 2004 23:48:42 +0000 (23:48 +0000)]
Add two more variants of add. Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11510
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 16 Feb 2004 23:32:26 +0000 (23:32 +0000)]
Preemptive additions for the MallocBench tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11507
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 22:57:19 +0000 (22:57 +0000)]
Only spit out warning for functions that take pointers, not for sin and the like
Add more special case handling for stdio functions. I feel dirty, how about you?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11506
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 20:46:13 +0000 (20:46 +0000)]
Move the folding of gep null, 0, 0, 0 to a place where it can be shared and
enjoyed by all, fixing a fixme. Add an assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11505
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 16 Feb 2004 19:45:26 +0000 (19:45 +0000)]
PreSelection isn't optional and so there's no way to turn it off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11504
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 18:37:40 +0000 (18:37 +0000)]
memset and bcopy and now unified by the llvm.memset intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11503
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 18:19:31 +0000 (18:19 +0000)]
Add some ADD instructions that take memory operands for Alkis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11502
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 16 Feb 2004 14:55:18 +0000 (14:55 +0000)]
Adjusted the default pathname to the SPEC95 benchmarks. The new directory
has source code corrections and some input files pre-filtered for use
with the LLVM test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11498
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Mon, 16 Feb 2004 07:17:43 +0000 (07:17 +0000)]
Add LeakDetection to MachineInstr.
Move out of line member functions of MachineBasicBlock to
MachineBasicBlock.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11497
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 06:35:48 +0000 (06:35 +0000)]
Implement test/Regression/Transforms/SimplifyCFG/UncondBranchToReturn.ll,
see the testcase for the reasoning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11496
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 06:35:19 +0000 (06:35 +0000)]
New testcase, details in the comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11495
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 05:07:08 +0000 (05:07 +0000)]
Fold PHI nodes of constants which are only used by a single cast. This implements
phi.ll:test4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11494
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 05:06:36 +0000 (05:06 +0000)]
A new testcase for a situation that occurs in 181.mcf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11493
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 03:54:20 +0000 (03:54 +0000)]
Teach LLVM to unravel the "swap idiom". This implements:
Regression/Transforms/InstCombine/xor.ll:test20
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11492
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 03:53:44 +0000 (03:53 +0000)]
Add a test for the "swap idiom", which LLVM should be able to unravel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11491
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 01:20:27 +0000 (01:20 +0000)]
Implement Transforms/InstCombine/xor.ll:test19
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11490
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 16 Feb 2004 01:19:52 +0000 (01:19 +0000)]
Test for xor chains
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11489
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 23:33:48 +0000 (23:33 +0000)]
Fix a bug in the recent rewrite of the leakdetector that caused all of the
nightly tests to be really messed up. The problem was that the new leakdetector
was depending on undefined behavior: the order of destruction of static objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11488
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 23:09:07 +0000 (23:09 +0000)]
Document bug 240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11487
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 22:56:30 +0000 (22:56 +0000)]
Moving CBE tests to test/Regression/CodeGen/CBackend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11486
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 22:54:19 +0000 (22:54 +0000)]
When the user runs 'llc foo.bc -march=c', write the output to "foo.cbe.c", not
to "foo.s".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11485
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 22:51:47 +0000 (22:51 +0000)]
Now that the lowerinvoke pass inserts calls to llvm.setjmp/llvm.longjmp, some
hacks can be banished. Also, this gives us the opportunity to emit special code
for the setjmp/longjmps which alows the elimination of one GCC warning for every
setjmp/longjmp site (which is often THOUSANDS in C++ programs). Yaay!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11484
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 22:24:51 +0000 (22:24 +0000)]
By default, llvm.setjmp/llvm.longjmp intrinsics get lowered to their libc counterparts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11483
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 22:24:27 +0000 (22:24 +0000)]
Instead of producing calls to setjmp/longjmp, produce uses of the
llvm.setjmp/llvm.longjmp intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11482
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 22:16:39 +0000 (22:16 +0000)]
Refactor code. Now the intrinsic lowering pass tries to recycle preexisting
prototypes, even if they don't precisely match what it would prefer to use.
This fixes: CBackend/2004-02-15-PreexistingExternals.llx compiling it into:
ltmp_0_30 = memcpy(l14_C, 4u, 17);
ltmp_1_30 = memcpy(((int *)l27_A), ((unsigned )(long)l27_B), ((int )123u));
instead of:
ltmp_0_30 = memcpy(l14_C, 4u, 17);
ltmp_1_27 = l43_memcpy(l27_A, l27_B, 123u);
Which does the wrong thing as you could imagine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11481
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 22:14:46 +0000 (22:14 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11480
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 15 Feb 2004 21:50:32 +0000 (21:50 +0000)]
This pass should not require phi elimination or live variable
analysis. It should only preserve them and update LiveVariables if it
already ran.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11479
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 21:38:28 +0000 (21:38 +0000)]
Finegrainify namespacification
Remove one of the operands of a two operand instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11478
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 15 Feb 2004 21:37:17 +0000 (21:37 +0000)]
Make dense maps keyed on physical registers smallerusing
MRegisterInfo::getNumRegs() instead of
MRegisterInfo::FirstVirtualRegister.
Also use MRegisterInfo::is{Physical,Virtual}Register where
appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11477
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 15 Feb 2004 10:24:21 +0000 (10:24 +0000)]
Eliminate the use of spill (reserved) registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11476
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 06:00:04 +0000 (06:00 +0000)]
QOI bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11475
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 05:55:15 +0000 (05:55 +0000)]
Adjustments to support the new ConstantAggregateZero class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11474
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 05:54:27 +0000 (05:54 +0000)]
Add support for the new ConstantAggregateZero class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11473
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 05:54:06 +0000 (05:54 +0000)]
Make the JIT zero out globals with memset instead of an element at a time. This
should speed it up a bit on a lot of programs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11472
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 05:53:42 +0000 (05:53 +0000)]
No need to scan zero initializers. This should make DSA a bit faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11471
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 05:53:04 +0000 (05:53 +0000)]
Add a new ConstantAggregateZero class, to fix PR239. This makes zero
initializers for constant structs and arrays take constant space, instead of
space proportinal to the number of elements. This reduces the memory usage of
the LLVM compiler by hundreds of megabytes when compiling some nasty SPEC95
benchmarks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11470
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 05:52:36 +0000 (05:52 +0000)]
finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11469
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 05:47:37 +0000 (05:47 +0000)]
Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11468
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 04:14:47 +0000 (04:14 +0000)]
ConstantArray::get and ConstantStruct::get now just return pointers to
'Constant', instead of specific subclass pointers. In the future, these will
return an instance of ConstantAggregateZero if all of the inputs are zeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11467
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 04:07:32 +0000 (04:07 +0000)]
Remove dependence on return type of ConstantStruct::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11466
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 04:05:58 +0000 (04:05 +0000)]
Remove dependence on the return type of ConstantArray::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11463
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 02:46:46 +0000 (02:46 +0000)]
Keep a cache of non-abstract null arrays and structs. This speeds up llvm-dis
from 16.57 -> 13.46s on 129.compress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11462
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 02:19:08 +0000 (02:19 +0000)]
Testcase for PR205: [llvmgcc] C front-end does not emit 'zeroinitializer' when possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11461
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 01:21:39 +0000 (01:21 +0000)]
Test for actual support, not just for lack of crashage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11460
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 01:04:03 +0000 (01:04 +0000)]
Implement llvm.(frame|return)address(0) correctly. They are used by the LLVM JIT, among other
applications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11459
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 15 Feb 2004 00:46:41 +0000 (00:46 +0000)]
Fix problem in DEBUG code. I could be pointing past the end and
dereferencing it causes an assertion error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11458
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 00:23:15 +0000 (00:23 +0000)]
New code quality fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11457
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 00:21:04 +0000 (00:21 +0000)]
New testcase for PR237: [x86] wierd stack/frame pointer manipulation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11456
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 00:15:37 +0000 (00:15 +0000)]
Fix the 'have a framepointer' case, so that the frame pointer always points
to the old saved EBP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11455
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 15 Feb 2004 00:14:20 +0000 (00:14 +0000)]
Allow for fixed objects to reside in the local area, and if they don't to not
clobber them by allocating other objects in the same space!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11454
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 15 Feb 2004 00:03:15 +0000 (00:03 +0000)]
Add back machine code deleter pass until we get a MachineCode pass
that will be responsible for the creation of MachineFunctions and will
be required by all MachineFunctionPass passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11453
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sat, 14 Feb 2004 23:33:39 +0000 (23:33 +0000)]
Modularize implementation of LeakDetector into a typed template
implementation class. This makes the code simpler and allows for more
types to be added easily. It also implements caching for generic
objects (it was only available for llvm objects).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11452
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 21:06:02 +0000 (21:06 +0000)]
Add support for the 'pop' instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11451
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 20:11:07 +0000 (20:11 +0000)]
There is no reason to align the stack pointer if there are no callees of this
function!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11450
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 20:10:59 +0000 (20:10 +0000)]
There is no reason to align the stack pointer if there are no callees of this function!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 19:49:54 +0000 (19:49 +0000)]
The prologue/epilogue related method calls have no reason to return a value,
make them return void.
This allows us to avoid some costly MBB.size() calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11448
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 19:49:05 +0000 (19:49 +0000)]
The prologue/epilogue related method calls have no reason to return a value,
make them return void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 19:27:26 +0000 (19:27 +0000)]
fix typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 06:00:36 +0000 (06:00 +0000)]
finegrainify namespacification, fix 80col prob
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11445
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 04:52:06 +0000 (04:52 +0000)]
A target that doesn't support these intrinsics will still meet spec (the
intrinsic will always produce zero), but it will behave unexpectedly, so
warn like GCC does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11444
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 04:47:23 +0000 (04:47 +0000)]
Urg, right. These need an input value...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11443
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 04:46:05 +0000 (04:46 +0000)]
Codegen llvm.memset into rep stos[bwd]. Simplify code for llvm.memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11442
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 04:45:37 +0000 (04:45 +0000)]
add 'rep stos[bwd]' instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11441
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 04:26:15 +0000 (04:26 +0000)]
new testcase for llvm.memset generation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11440
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 04:12:41 +0000 (04:12 +0000)]
These should be mentioned
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11439
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 04:08:35 +0000 (04:08 +0000)]
Document new intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11438
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 04:08:29 +0000 (04:08 +0000)]
builtin_return/frame_address now work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11437
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 04:06:48 +0000 (04:06 +0000)]
Testcase for builtin frame/return address
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11436
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 03:46:37 +0000 (03:46 +0000)]
Test that the CFE compiles memset and bzero to llvm.memset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11435
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 02:55:47 +0000 (02:55 +0000)]
Add a testcase for the frameaddress and returnaddress intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11434
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 02:55:36 +0000 (02:55 +0000)]
Add support for the returnaddress and frameaddress intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11433
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 02:51:40 +0000 (02:51 +0000)]
Test that the code generator supports these intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11432
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 02:47:17 +0000 (02:47 +0000)]
Add llvm.memset/frameaddress/returnaddress intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11431
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sat, 14 Feb 2004 01:18:34 +0000 (01:18 +0000)]
Use newly added next() and prior() utility functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11430
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sat, 14 Feb 2004 01:17:28 +0000 (01:17 +0000)]
Add next() and prior() iterator utility functions. Unlike std::advance
they do not modify the passed iterator but return a copy.
next(myIt) returns copy of myIt incremented once
next(myIt, n) returns copy of myIt incremented n times
prior(myIt) returns copy of myIt decremented once
prior(myIt, n) returns copy of myIt decremented n times
While at it remove obsolete implementation of mapped_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11429
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 01:07:17 +0000 (01:07 +0000)]
Updates for the C backend's movement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11428
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sat, 14 Feb 2004 00:44:07 +0000 (00:44 +0000)]
Use std::numeric_limits<float>::infinity() instead of
std::numeric_limits<float>::max() for weighting preallocated
intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11427
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 00:31:10 +0000 (00:31 +0000)]
Use intrinsic lowering like the rest of the backends. Get rid of crufty hacky
code that worked around problems in the mangler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11426
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 00:30:31 +0000 (00:30 +0000)]
Add method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11425
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 14 Feb 2004 00:30:23 +0000 (00:30 +0000)]
Fix the logic in the name mangler. If there are two symbols named 'X', and one
is external, make sure to mangle the *internal* one, not external one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11424
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 13 Feb 2004 23:46:47 +0000 (23:46 +0000)]
Break a line that's over 80cols into two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11423
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:36:47 +0000 (23:36 +0000)]
There is no need to emit a shift if the size is constant, which is common
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11420
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:36:03 +0000 (23:36 +0000)]
Make sure to provide a prototype for the cbackend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11419
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:33:17 +0000 (23:33 +0000)]
Update tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11418
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:31:12 +0000 (23:31 +0000)]
Moved directory, update makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11417
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:29:37 +0000 (23:29 +0000)]
CBackend is no longer here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11416
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:29:20 +0000 (23:29 +0000)]
CBackend now lives here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11415
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:24:46 +0000 (23:24 +0000)]
Do not advertise our -c option anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11413
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:22:40 +0000 (23:22 +0000)]
Mercilessly rip the cbackend out of llvm-dis. Leave a helpful error message
for those who have not heard the news.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11412
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:19:51 +0000 (23:19 +0000)]
The cbackend has never had anything to do with llvm assembly writing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11411
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:19:09 +0000 (23:19 +0000)]
Add support for -march=c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11410
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:18:48 +0000 (23:18 +0000)]
Convert the C backend into a target, for use with LLC. This allows us to use
the lowerallocations pass to eliminate malloc/free warnings and hackish code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:01:14 +0000 (23:01 +0000)]
Change how we create the cwriter, and add a buttload of libraries that it now
needs. This will be fixed shortly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:00:45 +0000 (23:00 +0000)]
Change access to the cwriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11406
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Feb 2004 23:00:29 +0000 (23:00 +0000)]
Make the cwriter use the lowerinvoke pass so that it can either use "disabled exceptions" or
"expensive exceptions" controlled by an option. Also refactor and eliminate a bunch of cruft.
This is a temporary solution and causes millions of warnings to pour out of programs that use
exceptions, but it should fix the problem with sparc and the 'write' declaration (PR190).
Subsequent changes will make this stink much less
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11405
91177308-0d34-0410-b5e6-
96231b3b80d8