Commit Graph

18662 Commits

Author SHA1 Message Date
Evan Cheng
97de913821 eliminateFrameIndex() change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36626 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 09:13:03 +00:00
Evan Cheng
8e33473321 If call frame is not part of stack frame and no dynamic alloc, eliminateFrameIndex() must adjust SP offset with size of call frames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36625 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 09:01:42 +00:00
Evan Cheng
498f55989a Forgot about chain result; also UNDEF cannot have multiple values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36622 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 08:53:39 +00:00
Chris Lattner
60ce9b5a01 fix build with non-buggy compilers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36621 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 07:03:37 +00:00
Chris Lattner
a7c49aac98 handle function-level forward references, read binops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36620 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 07:01:57 +00:00
Nate Begeman
7bf1c272ab llvm bug #1350, parts 1, 2, and 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36618 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 05:57:02 +00:00
Chris Lattner
980e5aad4c implement materializeModule, force deallocation of vector memory when we
are done with them, start implementing ParseFunctionBody


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36617 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 05:52:21 +00:00
Chris Lattner
866971474c The stream to read from is now an ivar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36615 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 05:01:34 +00:00
Chris Lattner
48f848716e implement scafolding for lazy deserialization of function bodies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36614 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 04:59:48 +00:00
Chris Lattner
be1f993f2d write the symbol table for function bodies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36610 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 02:14:57 +00:00
Chris Lattner
d309c75b7d encode all of the instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36609 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 02:13:26 +00:00
Evan Cheng
5c3885ce8e Under normal circumstances, when a frame pointer is not required, we reserve
argument space for call sites in the function immediately on entry to the
current function. This eliminates the need for add/sub sp brackets around call
sites. However, this is not always a good idea. If the "call frame" is large and
the target load / store instructions have small immediate field to encode sp
offset, this can cause poor codegen. In the worst case, this can make it
impossible to scavenge a register if the reserved spill slot is pushed too far
apart from sp / fp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36607 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 00:52:08 +00:00
Evan Cheng
45a7ca9b23 * Only turn a load to UNDEF if all of its outputs have no uses (indexed loads
produce two results.)
* Do not touch volatile loads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36604 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 00:38:21 +00:00
Chris Lattner
77edc4b1b0 Fix PR1228 and CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36602 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 23:35:00 +00:00
Chris Lattner
c11ce86943 print isLandingPad() for MBBs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36600 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 23:12:53 +00:00
Chris Lattner
e7cf56aeee Continue refactoring inline asm code. If there is an earlyclobber output
register, preallocate all input registers and the early clobbered output.

This fixes PR1357 and CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36599 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 21:11:17 +00:00
Evan Cheng
e47e75b461 Updates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36594 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 18:42:09 +00:00
Chris Lattner
bf996f1d5e refactor GetRegistersForValue to take OpInfo as an argument instead of various
pieces of it.  No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36592 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 17:29:31 +00:00
Chris Lattner
3ff90dc1c8 refactor some code, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36590 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 17:16:27 +00:00
Chris Lattner
1f6f4c7346 Clean up multi-line asam string printing. Instead of printing:
# InlineAsm Start
        subfc r3,r5,r4
                subfze r4,r3
        # InlineAsm End

print:

        # InlineAsm Start
        subfc r3,r5,r4
        subfze r4,r3
        # InlineAsm End


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36589 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 17:00:18 +00:00
Anton Korobeynikov
bb1f97cf87 Fix typo. Interesting, but old variant worked too :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36588 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 10:28:40 +00:00
Dale Johannesen
9118dbc7bd Remove item: thumb padding in constant islands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36586 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 00:32:06 +00:00
Dale Johannesen
23c968478e remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36585 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 00:30:48 +00:00
Reid Spencer
c9a83e4f19 If an archive is not recognized as an LLVM bytecode archive then declare
that it is native so that the linker will pass it on downstream. This avoids
a problem where the native link line fails because there is both a .so and
a .a file. The .a file gets processed as bytecode and then dropped from the
command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36584 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 00:29:39 +00:00
Lauro Ramos Venancio
0a1817392d Enable protected visibility on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36583 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 00:23:51 +00:00
Reid Spencer
126b1b8683 Dependent libraries could be native too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36582 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-30 00:00:10 +00:00
Anton Korobeynikov
9cd3ccf506 Implement visibility checking during linking. Also implement protected
visibility support for bitcode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36577 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 20:56:48 +00:00
Dale Johannesen
8593e41855 Rewrite of Thumb constant islands handling (exact allowance for padding
around islands and jump tables).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36573 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 19:19:30 +00:00
Dale Johannesen
8650199fbb Make ARM-specific version of getInlineAsmLength
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36572 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 19:17:45 +00:00
Chris Lattner
6995cf6015 generalize aggregate handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36568 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 18:58:03 +00:00
Anton Korobeynikov
f52e608459 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36566 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 18:38:24 +00:00
Anton Korobeynikov
6f9896fcc8 Implement protected visibility. This partly implements PR1363. Linker
should be taught to deal with protected symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36565 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 18:35:00 +00:00
Anton Korobeynikov
c6c98af9e5 Implement review feedback
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36564 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 18:02:48 +00:00
Jeff Cohen
930c0fead9 Fix MemoryBuffer breakage correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36561 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 14:43:31 +00:00
Jeff Cohen
9bc406019e Unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36559 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 14:21:44 +00:00
Chris Lattner
c453f76e2b Switch the bitcode reader interface to take a MemoryBuffer instead of knowing
anything about disk I/O itself.  This greatly simplifies its interface -
eliminating the need for the ReaderWrappers.cpp file.

This adds a new option to llvm-dis (-bitcode) which instructs it to read
the input file as bitcode.  Until/unless the bytecode reader is taught to
read from MemoryBuffer, there is no way to handle stdin reading without it.

I don't plan to switch the bytecode reader over, I'd rather delete it :),
so the option will stay around temporarily.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36554 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 07:54:31 +00:00
Chris Lattner
333ffd4abf Add a new memorybuffer class, to unify all the file reading code in the system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36553 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 06:58:52 +00:00
Chris Lattner
01b27458a1 Fix this to use the right block ID
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36550 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 05:49:09 +00:00
Chris Lattner
1a9df8eee0 moved Writer.cpp -> BitcodeWriter.cpp to make it more unique in the tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36549 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 05:31:57 +00:00
Chris Lattner
09e4b7e1b7 memory operands that have a direct operand should have their stores created
before the copies into physregs are done.  This avoids having flag operands
skip the store, causing cycles in the dag at sched time.  This fixes infinite
loops on these tests:

test/CodeGen/Generic/2007-04-08-MultipleFrameIndices.ll for PR1308
test/CodeGen/PowerPC/2007-01-29-lbrx-asm.ll
test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll
test/CodeGen/X86/2006-07-12-InlineAsmQConstraint.ll for PR828


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36547 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 21:12:06 +00:00
Chris Lattner
c83994e5d4 eliminate more redundant constraint type analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36546 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 21:03:16 +00:00
Chris Lattner
2a600be226 merge constraint type analysis stuff together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36545 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 21:01:43 +00:00
Chris Lattner
0c58340aea Significant refactoring of the inline asm stuff, to support future changes.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 20:49:53 +00:00
Reid Spencer
9c9b63a5b8 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36543 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 16:07:31 +00:00
Reid Spencer
863dd88cc5 Revert the premature portion of the last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36542 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 16:06:50 +00:00
Anton Korobeynikov
7dde0ff0ba This is not "FIXME" anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36541 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 14:57:59 +00:00
Anton Korobeynikov
0f53f7f240 Let Verifier check aliasees
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 14:35:41 +00:00
Reid Spencer
3cb4ddaec0 Fix a compilation error (jump to case label).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36539 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 14:13:42 +00:00
Anton Korobeynikov
38e09802f6 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36538 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 13:48:45 +00:00
Anton Korobeynikov
a80e1181b7 Implement review feedback. Aliasees can be either GlobalValue's or
bitcasts of them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 13:45:00 +00:00