Commit Graph

32105 Commits

Author SHA1 Message Date
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
Reid Spencer
3b726396ab Augment the verbose output to print out the sub-commands executed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36581 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 23:59:47 +00:00
Chris Lattner
8d89f1fbb6 add some helpers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36580 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 21:49:05 +00:00
Chris Lattner
b30c925046 Implement much expanded dumper support. We now print stuff like:
<MODULE_BLOCK NumWords=27 BlockCodeSize=3>
  <TYPE_BLOCK NumWords=7 BlockCodeSize=4>
    <NUMENTRY op0=7>
    <POINTER op0=1>
    <FUNCTION op0=0 op1=2 op2=2 op3=2 op4=2>
    <VECTOR op0=2 op1=3>
    <INTEGER op0=64>
    <VECTOR op0=8 op1=5>
    <INTEGER op0=16>
    <VOID>
...

With work, the operands can be pretty printed symbolically.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36579 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 21:48:19 +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
Chris Lattner
4238d474b4 add some simple per-block statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36576 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 20:00:02 +00:00
Chris Lattner
a2d0ad4fe2 compute this value correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36575 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 19:49:58 +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
bd40a6d3ee add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36571 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 19:17:32 +00:00
Chris Lattner
1d81d88fe3 not all targets want to return an i32. What really matters is whether llc accepts the generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36569 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 18:59:01 +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
Chris Lattner
ee181bc899 Jeff's fix was fine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36563 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 17:44:10 +00:00
Chris Lattner
9728905481 add missing ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36562 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 17:40:50 +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
1d6bf2f580 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36560 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 14:22:14 +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
Anton Korobeynikov
21beed669e Updated aliases test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36558 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 10:34:42 +00:00
Chris Lattner
32de6330f1 Implement support to read an arbitrary bitcode file. Next up, dumping the
file symbolically and actually computing statistics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36557 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 08:31:14 +00:00
Chris Lattner
45e0f890f8 very early support for analyzing a bitstream. This opens the file, starts
reading the stream, and detects whether it is LLVM IR or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36556 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 08:12:22 +00:00
Chris Lattner
107d80956d make this file self-contained
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36555 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 08:05:07 +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
a527bf13a5 new method for creating a path, which does not create a temporary string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36552 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 06:16:32 +00:00
Chris Lattner
63db485b79 fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36551 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 05:51:00 +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
Jeff Cohen
b627eab040 Minor corrections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36548 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 01:07:00 +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
Chris Lattner
44b2c5098f memory inputs to an inline asm are required to have an address available.
If the operand is not already an indirect operand, spill it to a constant
pool entry or a stack slot.

This fixes PR1356 and CodeGen/X86/2007-04-27-InlineAsm-IntMemInput.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36536 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 06:42:38 +00:00
Chris Lattner
c44f3ea172 new testcase for PR1356
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36535 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 06:41:13 +00:00
Chris Lattner
f2f3cd5129 Fix CodeGen/Generic/2007-04-27-LargeMemObject.ll and
CodeGen/Generic/2007-04-27-InlineAsm-X-Dest.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36534 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 06:08:13 +00:00
Chris Lattner
15c928640d ensure the operand prints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36533 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 06:07:55 +00:00
Chris Lattner
5bee46d8e3 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36532 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 06:05:59 +00:00
Chris Lattner
93e3d8f308 update syntax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36531 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 06:03:12 +00:00