1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

1889 Commits

Author SHA1 Message Date
Chris Lattner
206534649d use an auto_ptr to avoid an explicit delete
llvm-svn: 36850
2007-05-06 05:47:36 +00:00
Chris Lattner
ec83593e41 add bitcode support
llvm-svn: 36849
2007-05-06 05:47:06 +00:00
Chris Lattner
11ca4f51ed Remove the -emit-bytecode option. Noone in the llvm tree uses it, and this
keeps llvm-upgrade a simple "source to source" tool.

llvm-svn: 36848
2007-05-06 05:40:41 +00:00
Chris Lattner
9233c279e4 add bitcode reading support to llvm-nm
llvm-svn: 36847
2007-05-06 05:36:18 +00:00
Chris Lattner
fd05be1b3e bitcodify, remove eh cruft
llvm-svn: 36844
2007-05-06 05:21:42 +00:00
Chris Lattner
5c5d5f3f88 debugger depends on bcreader, not llvm-db
llvm-svn: 36842
2007-05-06 05:18:37 +00:00
Chris Lattner
fddf624171 remove EH cruft, add bitcode support
llvm-svn: 36841
2007-05-06 05:13:17 +00:00
Chris Lattner
f4f88e36a2 add bitcode reading support, remove eh stuff
llvm-svn: 36840
2007-05-06 04:58:26 +00:00
Chris Lattner
22509133cd add bitcode reading support. Remove EH cruft.
llvm-svn: 36839
2007-05-06 04:55:19 +00:00
Chris Lattner
d29a084c58 bitcodify
llvm-svn: 36838
2007-05-06 04:49:55 +00:00
Chris Lattner
b1e3362cf6 simplify code
llvm-svn: 36837
2007-05-06 04:43:36 +00:00
Chris Lattner
8d545b17bc add support to llvm-prof for reading from a bitcode file
llvm-svn: 36836
2007-05-06 04:43:00 +00:00
Chris Lattner
4a9c418915 if -bitcode is specified, read and write a bitcode file instead of a bytecode file.
llvm-svn: 36830
2007-05-06 02:42:03 +00:00
Chris Lattner
c9ca38fedf add inline asm code
llvm-svn: 36826
2007-05-06 01:50:11 +00:00
Chris Lattner
6d0c5eb739 add a denser encoding for null terminated strings, add a 6-bit abbrev as
well.  This shrinks kc++ from 2724088 to 2717360 bytes.

llvm-svn: 36821
2007-05-06 00:53:07 +00:00
Chris Lattner
d3a2d22853 emit spiffy little histograms of codes, if enabled. Don't print averages if
there is only one item.

llvm-svn: 36773
2007-05-05 01:46:49 +00:00
Chris Lattner
b0f9baa6d6 do not charge subblock sizes to the parent block.
llvm-svn: 36772
2007-05-05 01:29:31 +00:00
Chris Lattner
817fbdc02d update to new APIs, make output a bit (haha) nicer
llvm-svn: 36768
2007-05-05 00:17:42 +00:00
Chris Lattner
6ded0dd248 add support for new codes/block
llvm-svn: 36726
2007-05-04 03:01:41 +00:00
Evan Cheng
403a672a5b Added -rsh-host and -rsh-user to support remote execution.
llvm-svn: 36685
2007-05-03 18:36:15 +00:00
Devang Patel
cd45427a87 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162 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.

llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
38a66bc82e Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Chris Lattner
adc0d44678 add phi
llvm-svn: 36611
2007-05-01 02:43:46 +00:00
Reid Spencer
8e71316320 Augment the verbose output to print out the sub-commands executed.
llvm-svn: 36581
2007-04-29 23:59:47 +00:00
Chris Lattner
5c6ead0212 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.

llvm-svn: 36579
2007-04-29 21:48:19 +00:00
Chris Lattner
112645d174 add some simple per-block statistics
llvm-svn: 36576
2007-04-29 20:00:02 +00:00
Chris Lattner
25f905472a Implement support to read an arbitrary bitcode file. Next up, dumping the
file symbolically and actually computing statistics.

llvm-svn: 36557
2007-04-29 08:31:14 +00:00
Chris Lattner
d48cbf15f8 very early support for analyzing a bitstream. This opens the file, starts
reading the stream, and detects whether it is LLVM IR or not.

llvm-svn: 36556
2007-04-29 08:12:22 +00:00
Chris Lattner
eee1022086 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.

llvm-svn: 36554
2007-04-29 07:54:31 +00:00
Chris Lattner
799a92b8af fit in 80 cols
llvm-svn: 36551
2007-04-29 05:51:00 +00:00
Chris Lattner
bae21d5840 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.  :(

llvm-svn: 36508
2007-04-27 17:02:33 +00:00
Jeff Cohen
3dedea42de Add new option to usage help.
llvm-svn: 36347
2007-04-22 18:33:20 +00:00
Chris Lattner
7a7b428942 don't break reading from stdin
llvm-svn: 36336
2007-04-22 06:35:20 +00:00
Chris Lattner
1bfb4bd16d link in bitwriter library
llvm-svn: 36335
2007-04-22 06:31:35 +00:00
Chris Lattner
c5bfff06f0 teach llvm-dis to read bitcode files
llvm-svn: 36334
2007-04-22 06:31:02 +00:00
Chris Lattner
dd27143526 add a temporary -bitcode option, which instructs llvm-as to produce a bitcode file instead of a bytecode file
llvm-svn: 36333
2007-04-22 06:28:58 +00:00
Reid Spencer
4721577334 For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.

llvm-svn: 36327
2007-04-22 05:46:44 +00:00
Reid Spencer
b83b878606 Add the --host-target option.
llvm-svn: 36326
2007-04-22 05:05:36 +00:00
Chris Lattner
876d03d9fa remove cruft
llvm-svn: 36268
2007-04-20 04:45:58 +00:00
Reid Spencer
19a7c47328 Regenerate.
llvm-svn: 36106
2007-04-16 03:05:01 +00:00
Reid Spencer
35f2799915 For PR1336:
Functions without names deserve to be created too. This fixes:
test/CodeGen/Generic/vector-constantexpr.ll

llvm-svn: 36105
2007-04-16 03:04:13 +00:00
Reid Spencer
15a5b3e2b2 For PR1336:
When upgrading global vars, look for conflicts with functions as well. This
fixes test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll

llvm-svn: 36103
2007-04-16 02:56:33 +00:00
Reid Spencer
499c46e182 Regenerate.
llvm-svn: 36096
2007-04-16 00:40:57 +00:00
Reid Spencer
4d7295a38c 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

llvm-svn: 36095
2007-04-16 00:39:39 +00:00
Reid Spencer
a9cb0e6602 Make the generated code for ConstantInt nicer.
llvm-svn: 35902
2007-04-11 13:02:56 +00:00
Reid Spencer
02fa4016d8 Teach llvm2cpp about packed structure types.
llvm-svn: 35899
2007-04-11 12:41:49 +00:00
Reid Spencer
2d8e57357e 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.

llvm-svn: 35898
2007-04-11 12:28:56 +00:00
Reid Spencer
db5c4ad62d Regenerate.
llvm-svn: 35897
2007-04-11 12:10:58 +00:00
Reid Spencer
06deba6151 Fix a crash-by-unknown-exception caused by attempting to use a null pointer
as the key for a map insertion.

llvm-svn: 35896
2007-04-11 12:10:08 +00:00
Reid Spencer
43a624d516 Fix some issues with param attrs.
llvm-svn: 35894
2007-04-11 10:01:32 +00:00
Reid Spencer
356c181e74 Add support for parameter attributes.
llvm-svn: 35893
2007-04-11 09:54:08 +00:00
Reid Spencer
2792e203c5 For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.

llvm-svn: 35877
2007-04-11 02:44:20 +00:00
Devang Patel
4c310f1c94 Enable loop rotate pass.
llvm-svn: 35863
2007-04-10 15:43:36 +00:00
Reid Spencer
3ffd70d6e4 Regenerate
llvm-svn: 35813
2007-04-09 06:16:21 +00:00
Reid Spencer
b7cec347b9 For PR1146:
Adapt handling of parameter attributes to use ParamAttrsList class.

llvm-svn: 35812
2007-04-09 06:15:59 +00:00
Reid Spencer
b60fbb02e4 Make TempDir a PathWithStatus so we don't have to cast it to one.
llvm-svn: 35772
2007-04-08 20:08:01 +00:00
Reid Spencer
a7785f7098 Avoid temporary construction and potential for corrupted data access.
llvm-svn: 35771
2007-04-08 20:06:05 +00:00
Reid Spencer
2d2f6992e7 Don't rely on destructed local storage. Thanks, Chris.
llvm-svn: 35769
2007-04-08 19:59:07 +00:00
Reid Spencer
875a2bc4db For PR1291:
Change uses of sys::Path class to sys::PathWithStatus in those places where
the file status information is needed.

llvm-svn: 35743
2007-04-07 18:53:16 +00:00
Reid Spencer
aef6cbcf93 Regenerate.
llvm-svn: 35736
2007-04-07 16:14:01 +00:00
Reid Spencer
1a33bb397b For PR1312:
For the short CALL/INVOKE syntax, the signedness of the result type is two
extractions away from the type argument because its a POINTER to function
type, not a function type.

llvm-svn: 35735
2007-04-07 16:10:37 +00:00
Chris Lattner
17045ee2d5 run a late dce pass to clean up extra cruft.
llvm-svn: 35684
2007-04-05 16:50:20 +00:00
Reid Spencer
0d5c9466d3 For PR1302:
Rename LinkItems as NativeLinkItems since it is filled out by the Linker
library to contain only those items deemed to be native.

llvm-svn: 35654
2007-04-04 06:34:22 +00:00
Reid Spencer
fa84b75ad8 Regenerate
llvm-svn: 35579
2007-04-02 02:08:35 +00:00
Reid Spencer
ad1ee4e65a Upgrade the bit count intrinsics to have an i32 result.
llvm-svn: 35578
2007-04-02 02:08:05 +00:00
Reid Spencer
6f0e15627f Regenerate
llvm-svn: 35571
2007-04-02 01:14:00 +00:00
Reid Spencer
92f0ca2c15 Don't upgrade functions that look like a bswap intrinsic but aren't.
llvm-svn: 35570
2007-04-02 01:13:36 +00:00
Reid Spencer
ae215d7dcf Handle upgrade of llvm.bswap.iXX to llvm.bswap.iXX.iXX per new naming
rules for overloaded intrinsic functions.

llvm-svn: 35565
2007-04-02 00:50:28 +00:00
Reid Spencer
686756b11e Remove some non-sensical logic that prevented llvm-nm from working on any
file other than one named "-".

llvm-svn: 35478
2007-03-29 19:49:07 +00:00
Reid Spencer
4269ae1274 For PR789:
Make the sys::Path::getFileStatus function more efficient by having it
return a pointer to the FileStatus structure rather than copy it. Adjust
uses of the function accordingly. Also, fix some memory issues in sys::Path.

llvm-svn: 35476
2007-03-29 19:05:44 +00:00
Jeff Cohen
1992768a84 getFileStatus has a new parameter (caught by VC++).
llvm-svn: 35466
2007-03-29 17:29:59 +00:00
Jeff Cohen
f03cf02c8b Fix problem with llvm-config that prevented JIT from being used on x86_64
systems.

llvm-svn: 35416
2007-03-28 04:45:02 +00:00
Reid Spencer
39f16aef65 For PR1277:
Implement error handling for bytecode parsing.

Patch by Scott Michel.

llvm-svn: 35364
2007-03-26 22:38:01 +00:00
Evan Cheng
8c8e97507d Unbreak non-debug builds.
llvm-svn: 35264
2007-03-22 07:43:51 +00:00
Reid Spencer
7e5dbe3441 Regenerate.
llvm-svn: 35237
2007-03-21 17:27:53 +00:00
Reid Spencer
e4fa26b209 For PR1243:
Okay, really fix it this time. Make sure the CurFun.Linkage is set early
and consolidate some duplicate code.

llvm-svn: 35236
2007-03-21 17:26:41 +00:00
Reid Spencer
d1f592b16f Regenerate.
llvm-svn: 35235
2007-03-21 17:15:50 +00:00
Reid Spencer
4149df60dd For PR1256:
Make Signedness information pervasive throughout all types and values.
There is no easy way to get around this. Because the GEP instruction can
index through an arbitrarily complex value structure, it is necessary to
keep track of signedness information throughout that structure. This change
makes Signedness a full class, capable of representing Signedness in
arbitrarily shaped types. The class is then used throughout llvm-upgrade to
track signedness and differentiate between globals, locals, and functions
based on their signedness.

For PR1243:
This patch also removes bogus warnings about renaming internal globals. It
now only emits such warnings when renaming non-internal globals because
they may affect linkage.

llvm-svn: 35234
2007-03-21 17:14:36 +00:00
Reid Spencer
cb3d63d07c Regenerate.
llvm-svn: 35116
2007-03-15 03:26:42 +00:00
Reid Spencer
fa12fdc543 Revert last changes as they introduced other problems.
llvm-svn: 35115
2007-03-15 03:25:34 +00:00
Reid Spencer
ce9e3ade3a Regenerate.
llvm-svn: 35113
2007-03-14 23:13:06 +00:00
Reid Spencer
04cb556bca The sign information was not propagating into the rename map so only the
last entry stored in the map could be retrieved for a given integer type.
Propagating the sign information required an invasive change to ensure that
all ValueRef (ValID) instances get the right sign information as well. Also,
put in some assertions to ensure the RenameMap always gives us out the type
that is expected.

This fixes PR1256 and
test/Assembler/2007-03-14-UgpradeLocalSignless.ll

llvm-svn: 35112
2007-03-14 23:11:45 +00:00
Reid Spencer
bf9ab59940 For PR1256:
Carry sign with ValID and make TypeInfo sortable (useful in a map).

llvm-svn: 35111
2007-03-14 23:08:04 +00:00
Jeff Cohen
c9e2aa16cb Make older versions of bison happy.
llvm-svn: 35099
2007-03-14 15:27:17 +00:00
Devang Patel
16107bb71b Now LICM is a LoopPass.
llvm-svn: 35001
2007-03-07 04:41:30 +00:00
Devang Patel
c35610b9f9 Now LoopUnswitch is a LoopPass.
llvm-svn: 34992
2007-03-07 00:26:10 +00:00
Reid Spencer
b99271c33c Obtain the exit function before execution just in case the module
disappears before we get to calling the exit function.

llvm-svn: 34953
2007-03-06 03:12:55 +00:00
Jeff Cohen
98c99a3a02 Unbreak VC++ build.
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Reid Spencer
49931e1841 1. Handle errors around the ModuleProvider. This is necessary since it is
reading bytecode.
2. The interpreter can delete the ModuleProvider and replace it with
   another so don't depend on it being around after the EE is created.
3. Don't just run llvm_shutdown on exit but actually delete the EE as well.
   This cleans up a vast amount of memory (but not all) that EE retained
   through exit.

llvm-svn: 34888
2007-03-03 18:21:44 +00:00
Reid Spencer
b7ff81c0dc Make output for ConstantInt construction correct for any bitwidth.
llvm-svn: 34809
2007-03-01 20:55:43 +00:00
Chris Lattner
f009de2932 remove use of deprecated apis
llvm-svn: 34418
2007-02-19 07:41:31 +00:00
Chris Lattner
9fcc5048b8 remove use of deprecated api
llvm-svn: 34416
2007-02-19 07:34:02 +00:00
Anton Korobeynikov
87e945c62d Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688

llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Reid Spencer
38c5974a57 Add missing break statements!
llvm-svn: 34341
2007-02-16 06:34:39 +00:00
Reid Spencer
e7ff3305d6 For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.

llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer
55e4e98a2a For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner
80be85730a eliminate use of vector-related ctors
llvm-svn: 34226
2007-02-13 06:05:43 +00:00
Chris Lattner
ea38fbb2bd regenerate
llvm-svn: 34225
2007-02-13 06:04:17 +00:00
Chris Lattner
d01df38c4c remove use of vector-related ctors
llvm-svn: 34224
2007-02-13 06:03:48 +00:00