Commit Graph

1902 Commits

Author SHA1 Message Date
Chris Lattner
68d4922adf bitcodify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36838 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:49:55 +00:00
Chris Lattner
0f4ed87c9c simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36837 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:43:36 +00:00
Chris Lattner
592488a4ef add support to llvm-prof for reading from a bitcode file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36836 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:43:00 +00:00
Chris Lattner
b330e38f4a if -bitcode is specified, read and write a bitcode file instead of a bytecode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36830 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 02:42:03 +00:00
Chris Lattner
c5ff2cc3de add inline asm code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36826 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 01:50:11 +00:00
Chris Lattner
cb3d91b05b add a denser encoding for null terminated strings, add a 6-bit abbrev as
well.  This shrinks kc++ from 2724088 to 2717360 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36821 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 00:53:07 +00:00
Chris Lattner
b1e85b58f0 emit spiffy little histograms of codes, if enabled. Don't print averages if
there is only one item.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36773 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 01:46:49 +00:00
Chris Lattner
44b0f10721 do not charge subblock sizes to the parent block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36772 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 01:29:31 +00:00
Chris Lattner
1772b12d13 update to new APIs, make output a bit (haha) nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36768 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 00:17:42 +00:00
Chris Lattner
cd5b7d7c9d add support for new codes/block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36726 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 03:01:41 +00:00
Evan Cheng
34e400ebe6 Added -rsh-host and -rsh-user to support remote execution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36685 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 18:36:15 +00:00
Devang Patel
1997473cf7 Drop 'const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 01:11:54 +00:00
Devang Patel
3e15bf33e0 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-02 21:39:20 +00:00
Devang Patel
794fd75c67 Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 21:15:47 +00:00
Chris Lattner
8f92668f53 add phi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36611 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 02:43:46 +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
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
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
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
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
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
020403209a reset errno to zero on entry to the application's main function. This fixes
MultiSource/Applications/minisat in the JIT.

Note that the libsystem stuff should ideally never modify errno.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 17:02:33 +00:00
Jeff Cohen
b5594e3066 Add new option to usage help.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36347 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 18:33:20 +00:00
Chris Lattner
197cceaaac don't break reading from stdin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36336 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:35:20 +00:00
Chris Lattner
395439bb22 link in bitwriter library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36335 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:31:35 +00:00
Chris Lattner
b3ca3622bb teach llvm-dis to read bitcode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36334 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:31:02 +00:00
Chris Lattner
27bb3af61c add a temporary -bitcode option, which instructs llvm-as to produce a bitcode file instead of a bytecode file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36333 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:28:58 +00:00
Reid Spencer
4f859aa532 For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36327 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 05:46:44 +00:00
Reid Spencer
3b87d6a7b5 Add the --host-target option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36326 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 05:05:36 +00:00
Chris Lattner
9c81664f6e remove cruft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36268 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-20 04:45:58 +00:00
Reid Spencer
e59f4931f4 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36106 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 03:05:01 +00:00
Reid Spencer
7055dafa7f For PR1336:
Functions without names deserve to be created too. This fixes:
test/CodeGen/Generic/vector-constantexpr.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 03:04:13 +00:00
Reid Spencer
53bd704b99 For PR1336:
When upgrading global vars, look for conflicts with functions as well. This
fixes test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36103 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 02:56:33 +00:00
Reid Spencer
ff0e448801 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36096 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 00:40:57 +00:00
Reid Spencer
d23c4dd08f For PR1336:
Rewrite the upgrade of GEP indices to be a little less obtuse. This fixes
test/Assembler/2002-08-19-BytecodeReader.llx
test/Assembler/2003-08-21-ConstantExprCast-Fold.llx
test/Assembler/2004-01-11-getelementptrfolding.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36095 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 00:39:39 +00:00
Reid Spencer
4d26a0619d Make the generated code for ConstantInt nicer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35902 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 13:02:56 +00:00
Reid Spencer
46fea10881 Teach llvm2cpp about packed structure types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35899 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 12:41:49 +00:00
Reid Spencer
07441666b6 Fix several bugs relating to changes in the LLVM IR API or just outright
typos in the output. This is sufficient to get most of the llvm2cpp tests
working again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 12:28:56 +00:00
Reid Spencer
baba98ae88 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35897 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 12:10:58 +00:00
Reid Spencer
8486744214 Fix a crash-by-unknown-exception caused by attempting to use a null pointer
as the key for a map insertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35896 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 12:10:08 +00:00
Reid Spencer
a9297b1a09 Fix some issues with param attrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35894 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 10:01:32 +00:00
Reid Spencer
6abd3daae1 Add support for parameter attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35893 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 09:54:08 +00:00
Reid Spencer
18da072088 For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35877 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 02:44:20 +00:00
Devang Patel
0aa37f472a Enable loop rotate pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35863 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-10 15:43:36 +00:00
Reid Spencer
7b5d466c88 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35813 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 06:16:21 +00:00
Reid Spencer
460dd9b644 For PR1146:
Adapt handling of parameter attributes to use ParamAttrsList class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35812 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 06:15:59 +00:00
Reid Spencer
b9125b1c85 Make TempDir a PathWithStatus so we don't have to cast it to one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35772 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 20:08:01 +00:00
Reid Spencer
7b57fe3554 Avoid temporary construction and potential for corrupted data access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35771 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 20:06:05 +00:00
Reid Spencer
184e67e208 Don't rely on destructed local storage. Thanks, Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35769 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 19:59:07 +00:00