1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

1190 Commits

Author SHA1 Message Date
Chris Lattner
cd5ae150bb Parse the %*# constraint modifiers
llvm-svn: 26341
2006-02-23 23:36:53 +00:00
Chris Lattner
b0362b8640 Another work around for the 'symbols with different types can have the same
name' issue.

llvm-svn: 26149
2006-02-13 21:43:26 +00:00
Chris Lattner
a8429e5f11 validate matching constraints and remember when we see them.
llvm-svn: 25892
2006-02-02 00:23:53 +00:00
Jeff Cohen
8b429890aa Fix VC++ compilation error.
llvm-svn: 25869
2006-02-01 04:37:04 +00:00
Chris Lattner
fa15301572 Beef up the interface to inline asm constraint parsing, making it more general, useful, and easier to use.
llvm-svn: 25866
2006-02-01 01:29:47 +00:00
Reid Spencer
bd79be19a2 Fix auto-upgrade of intrinsics to work properly with both assembly and
bytecode reading. This code is crufty, the result of much hacking to get things
working correctly. Cleanup patches will follow.

llvm-svn: 25682
2006-01-27 11:49:27 +00:00
Chris Lattner
c88610d074 add method for constraint parsing
llvm-svn: 25637
2006-01-26 02:21:59 +00:00
Chris Lattner
a0c517622a parse and verify the constraint string.
llvm-svn: 25631
2006-01-26 00:48:33 +00:00
Chris Lattner
e930f6bafb Make sure the only user of InlineAsm's are direct calls.
llvm-svn: 25626
2006-01-26 00:08:45 +00:00
Chris Lattner
b31becf499 Print InlineAsm objects
llvm-svn: 25617
2006-01-25 22:26:05 +00:00
Chris Lattner
d36993d81d Change inline asms to be uniqued like constants, not embedded in a Module.
llvm-svn: 25610
2006-01-25 18:57:27 +00:00
Chris Lattner
50ba79e71b Initial checkin of the InlineAsm class
llvm-svn: 25570
2006-01-24 04:13:11 +00:00
Chris Lattner
c53f8ef744 Pretty print file-scope asm blocks.
llvm-svn: 25568
2006-01-24 00:45:30 +00:00
Chris Lattner
239ebe1535 syntax change
llvm-svn: 25567
2006-01-24 00:40:17 +00:00
Chris Lattner
597ab252ea Print out inline asm strings
llvm-svn: 25556
2006-01-23 23:03:36 +00:00
Reid Spencer
f45b85c023 For PR411:
No functionality changes, just improve the code by a) providing better
function names, b) eliminating a call to get_suffix and c) tightening up
a function elimination test to reduce further checking.

llvm-svn: 25540
2006-01-23 07:42:30 +00:00
Chris Lattner
ff2ce95673 Speedup and simplify pass registration by the observation that there is
exactly one PassInfo object per RegisterPass object and that their lifetimes
are the same.  As such, there is no reason for the RegisterPass object to
dynamically allocate the PassInfo object at compiler startup time: just inline
the object by-value.  This should reduce codesize, heap size, and startup time. Yaay.

llvm-svn: 25521
2006-01-23 01:01:04 +00:00
Chris Lattner
f4277eb311 Remove dead expression.
llvm-svn: 25480
2006-01-20 18:04:43 +00:00
Chris Lattner
01e9dbfd60 Don't use invalidated use_iterator's. This fixes a crash compiling povray
llvm-svn: 25479
2006-01-20 18:01:41 +00:00
Reid Spencer
ff84512a3f Don't forget about casting the result of an upgraded call to an intrinsic
in the case where it needs to cast back to a signed type.

llvm-svn: 25447
2006-01-19 07:00:29 +00:00
Reid Spencer
8fd4d8e166 Make get_suffix faster by using a switch on getTypeID rather than a series
of comparisons on the various type objects.

llvm-svn: 25441
2006-01-19 05:37:27 +00:00
Reid Spencer
e14cf26e04 Don't accept the ctpop, cttz, or ctlz intrinsics with signed arguments. The
interface requires unsigned arguments.

llvm-svn: 25433
2006-01-19 01:20:03 +00:00
Reid Spencer
7ee9a0016a Add a new interface function to AutoUpgrade for simultaneously upgrading
the Function and the CallInst: UpgradeCallsToIntrinsic(Function*). Also,
re-factor the AutoUpgrade implementation to eliminate some duplication of
code.

llvm-svn: 25432
2006-01-19 01:18:29 +00:00
Robert Bocchino
4e3d87a0dc VMCore support for the insertelement operation.
llvm-svn: 25408
2006-01-17 20:07:22 +00:00
Reid Spencer
3cecd3c4cf For PR411:
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
  llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
  llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
  llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
  llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
  llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.

llvm-svn: 25366
2006-01-16 21:12:35 +00:00
Reid Spencer
ea1bec59db For PR411:
This file makes the helper functions for auto-upgrade of llvm assembly and
bytecode more accessible. This is part of de-overloading of intrinsic
functions to support the flat symbol table (no type planes).

llvm-svn: 25365
2006-01-16 21:06:01 +00:00
Chris Lattner
bc3620ba6b Thanks to Daniel Berlin's ETForest fix, we can now use it again for the verifier
llvm-svn: 25345
2006-01-15 21:58:50 +00:00
Chris Lattner
37428f4021 ET-Forest has issues with unreachable blocks. Temporarily disable verifiers use
of it until they are resolved.

llvm-svn: 25341
2006-01-15 20:00:51 +00:00
Chris Lattner
ab909c344b add a missing break that Reid noticed.
llvm-svn: 25328
2006-01-15 08:40:16 +00:00
Chris Lattner
551df64bd0 Change ET-Forest to automatically recalculate its DFSnum's if too many slow
queries are made.

Patch by Daniel Berlin!

llvm-svn: 25323
2006-01-14 20:55:09 +00:00
Nate Begeman
4750001146 Add bswap intrinsics as documented in the Language Reference
llvm-svn: 25309
2006-01-14 01:25:24 +00:00
Chris Lattner
e13a03d217 Add recognition and verification of new llvm.stacksave/llvm.stackrestore intrinsics
llvm-svn: 25266
2006-01-13 02:15:39 +00:00
Chris Lattner
d850f21540 Patch #10 from Saem:
"Extracts a few more methods, reduces some redundancy in the code at
the same time."

llvm-svn: 25248
2006-01-12 16:48:23 +00:00
Chris Lattner
376a82c32c Convert the verifier over to use ETForest instead of DominatorSet. Patch
by Daniel Berlin

llvm-svn: 25242
2006-01-12 06:17:59 +00:00
Jeff Cohen
7ee43e70bc Fix VC++ compilation error.
llvm-svn: 25214
2006-01-11 16:21:23 +00:00
Chris Lattner
97638d35a5 Patch #9 from Saem:
"Cut up the runPasses method into smaller pieces.  The small private
helpers should  be easier to deal with when code shuffling arising
from creating the new specialised batchers, not to mention, they're
much easier to understand.

I inlined them, in case function call overhead would be noticeable --
doubtful."

llvm-svn: 25213
2006-01-11 16:14:49 +00:00
Chris Lattner
c2cdeffb70 Simple is good. CVS is for revision control, not file headers
llvm-svn: 25206
2006-01-11 05:39:45 +00:00
Chris Lattner
7200905df3 Simple is good
llvm-svn: 25205
2006-01-11 05:38:55 +00:00
Robert Bocchino
472e42d3cc Added constant folding support for the extractelement operation.
llvm-svn: 25187
2006-01-10 20:03:46 +00:00
Robert Bocchino
9a57550e4e Added support for the extractelement operation.
llvm-svn: 25181
2006-01-10 19:05:34 +00:00
Reid Spencer
ebf3eceb26 For PR411:
First step in refactoring the SymbolTable is to split it into two classes,
one for a symbol table of types and one for a symbol table of Values.

llvm-svn: 25175
2006-01-10 09:51:48 +00:00
Chris Lattner
06a5b2acff Bugfix for etforest updating. Contributed by Daniel Berlin.
llvm-svn: 25152
2006-01-09 07:58:01 +00:00
Reid Spencer
1c717326d9 Saem Ghani's PassManager Patch #8:
This fixes a "gccass" regression. The -debug-pass=Structure option now
prints all the appropriate output

llvm-svn: 25151
2006-01-08 22:57:07 +00:00
Chris Lattner
84a9d11b28 Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!

llvm-svn: 25144
2006-01-08 08:22:18 +00:00
Chris Lattner
8d84170fb5 Patch #7 from Saem:
"added the asserts and casts, fixed the comments and started the break
down of the larger methods.  A few more patches and the breakdown
should be complete."

llvm-svn: 25142
2006-01-07 23:16:58 +00:00
Chris Lattner
ee327e57d2 Implement a few symbolic constant folding things. X ? Y : Y is Y.
Fold:
seteq ({ short }* cast (int 1 to { short }*), { short }* null)
setlt ({ short }* cast (int 1 to { short }*), { short }* cast (int 2 to { short }*))

to false/true.  These last two commonly occur in the output of compilers that
tag integers, like cozmic's scheme compiler.

Tested by Regression/Assembler/ConstantExprFold.llx

llvm-svn: 25112
2006-01-05 07:49:30 +00:00
Chris Lattner
253796d43f fix some formatting problems
llvm-svn: 25110
2006-01-05 07:19:51 +00:00
Chris Lattner
064e45054a Patch #6's in Saem's refactor-the-passmanager patch series. From him:
This sanitises the world, blows away the specialisations and adds
traits per passmanager type -- seemed most natural.

llvm-svn: 25085
2006-01-04 07:47:13 +00:00
Chris Lattner
586eae6b9a Saem's patch #5 of the passmanager refactoring
llvm-svn: 25078
2006-01-04 05:02:04 +00:00
Chris Lattner
76bf19b0d5 patch #4 in Saem's passmanager refactoring.
llvm-svn: 25077
2006-01-04 04:36:11 +00:00