Chris Lattner
bb961fb9d8
Asmprint csret nicely
...
llvm-svn: 28408
2006-05-19 21:29:57 +00:00
Chris Lattner
cf73ab6b7c
csret functions can be varargs (as can target cc's). Verify restrictions on
...
csret functions.
llvm-svn: 28405
2006-05-19 21:25:17 +00:00
Owen Anderson
5651df758a
Fix some think-o's in my last commit. Thanks to Chris for pointing them out.
...
llvm-svn: 28380
2006-05-18 05:46:08 +00:00
Owen Anderson
89fd16ffc8
Change Module to use TargetData-compatible strings internally.
...
This is part of the on-going work on PR 761.
llvm-svn: 28379
2006-05-18 02:10:31 +00:00
Chris Lattner
872e3ecaa1
inverted logic, caught by coverity
...
llvm-svn: 28290
2006-05-14 18:46:52 +00:00
Chris Lattner
703a8cf960
remove dead var
...
llvm-svn: 28287
2006-05-14 18:34:36 +00:00
Chris Lattner
32ddb45079
Add an assertion for a common error
...
llvm-svn: 28210
2006-05-10 04:32:43 +00:00
Chris Lattner
95f75d0506
Add assertions that verify that the actual arguments to a call or invoke match
...
the prototype of the called function.
llvm-svn: 28070
2006-05-03 00:48:22 +00:00
Chris Lattner
7cc9363937
Remove a hack required by V9.
...
llvm-svn: 27931
2006-04-21 15:33:35 +00:00
Chris Lattner
5ecb2adcc6
Move these ctors out of line
...
llvm-svn: 27713
2006-04-14 22:20:32 +00:00
Reid Spencer
ac43fc444d
Don't print out the install command for Intrinsics.gen unless VERBOSE mode.
...
llvm-svn: 27696
2006-04-14 06:32:31 +00:00
Reid Spencer
23eae83205
Don't emit useless warning messages.
...
llvm-svn: 27617
2006-04-12 17:56:16 +00:00
Chris Lattner
375b72b0a0
Add constant replacement for insertelement/vectorshuffle constant exprs
...
llvm-svn: 27532
2006-04-08 05:09:48 +00:00
Chris Lattner
73fc98fdeb
Use the isValidOperands helper instead of duplicating checking code
...
llvm-svn: 27524
2006-04-08 04:07:52 +00:00
Chris Lattner
6610c8ac0c
Add methods to check insertelement/extractelement instructions for validity,
...
check validity when instructions are created.
llvm-svn: 27523
2006-04-08 04:05:48 +00:00
Chris Lattner
14b19acd56
Add shufflevector support, todo, implement better constant folding.
...
llvm-svn: 27510
2006-04-08 01:18:18 +00:00
Chris Lattner
8c5ac50fb4
Constant fold extractelement(zero, x) -> zero
...
llvm-svn: 27479
2006-04-07 04:44:06 +00:00
Andrew Lenharth
038b30839d
Move this to lib/Analysis.
...
This reduces Core size, yay.
llvm-svn: 27468
2006-04-06 22:58:58 +00:00
Chris Lattner
d9ca6b5bfc
vector casts never reinterpret bits
...
llvm-svn: 27354
2006-04-02 05:40:28 +00:00
Chris Lattner
3aa0246b4a
Constant fold casts from things like <4 x int> -> <4 x uint>, likewise int<->fp.
...
llvm-svn: 27336
2006-04-02 01:38:28 +00:00
Chris Lattner
8e584affdb
constant fold extractelement with undef operands.
...
llvm-svn: 27301
2006-03-31 18:31:40 +00:00
Jeff Cohen
6c699c72a8
Fix build breakage.
...
llvm-svn: 27292
2006-03-31 07:22:05 +00:00
Chris Lattner
17549e4da1
Add a new method to verify intrinsic function prototypes.
...
llvm-svn: 27282
2006-03-31 04:46:47 +00:00
Jim Laskey
fb55c2c6a7
Bullet proof against undefined args produced by upgrading ols-style debug info.
...
llvm-svn: 27155
2006-03-26 22:46:27 +00:00
Chris Lattner
dc8250447f
Update dependencies to reflect split of the Intrinsics.td file
...
llvm-svn: 27144
2006-03-26 07:45:48 +00:00
Chris Lattner
a458878f87
Teach BinaryOperator::createNot to work with packed integer types
...
llvm-svn: 27124
2006-03-25 21:54:21 +00:00
Jim Laskey
5a27f03274
Cast instruction not inserted into basic block.
...
llvm-svn: 27122
2006-03-25 18:40:47 +00:00
Chris Lattner
b014b3c7ab
Implement Intrinsic::getName
...
llvm-svn: 27108
2006-03-25 06:32:47 +00:00
Jim Laskey
704b1e07a3
Fix indent.
...
llvm-svn: 27065
2006-03-24 10:08:23 +00:00
Jim Laskey
06c78bb995
Clean up some commentary.
...
llvm-svn: 27064
2006-03-24 10:00:56 +00:00
Jim Laskey
6e1c75ab01
Add some more bulletproofing to auto upgrade of llvm.dbg intrinsics.
...
llvm-svn: 26996
2006-03-23 20:13:25 +00:00
Jim Laskey
47de3793e3
Simplify handling of llvm.dbg intrinsic operands to one spot.
...
llvm-svn: 26987
2006-03-23 18:05:12 +00:00
Jim Laskey
570a3973ab
Change the argument types of llvm.dbg intrinsics.
...
llvm-svn: 26985
2006-03-23 18:03:20 +00:00
Reid Spencer
5f06b17693
Fix use of LEVEL.
...
llvm-svn: 26822
2006-03-17 07:39:44 +00:00
Reid Spencer
86ed2295c0
Two fixes:
...
1. Allow building of Intrinsics.gen to work for srcdir != objdir
2. Add a rule for installation of Intrinsics.gen.
llvm-svn: 26819
2006-03-17 06:27:06 +00:00
Chris Lattner
a5dfe68ee9
Bugfix, unbreaking CodeGen/PowerPC/cttz.ll
...
llvm-svn: 26764
2006-03-14 19:49:57 +00:00
Chris Lattner
981c57fdbd
Fix an et-forest memory leak. Patch by Daniel Berlin.
...
llvm-svn: 26763
2006-03-14 19:41:45 +00:00
Jim Laskey
11f7fe9fe5
1. Handle removal of all arguments for a morphed intrinsic.
...
2. Remove the declaration of llvm.dbg.declare.
llvm-svn: 26745
2006-03-14 02:00:35 +00:00
Reid Spencer
ba5d13fd59
Bring makefile back into compliance with standard by using
...
$(Echo) instead of @echo
llvm-svn: 26730
2006-03-13 17:57:31 +00:00
Jim Laskey
c741139c24
Handle the removal of the debug chain.
...
llvm-svn: 26729
2006-03-13 13:07:37 +00:00
Evan Cheng
02418117e1
Doh!
...
llvm-svn: 26705
2006-03-11 00:13:10 +00:00
Evan Cheng
57c206232d
Added a parameter to control whether Constant::getStringValue() would chop
...
off the result string at the first null terminator.
llvm-svn: 26704
2006-03-10 23:52:03 +00:00
Chris Lattner
e428e4d828
Use the autogenerated intrinsic verifier
...
llvm-svn: 26667
2006-03-09 22:06:04 +00:00
Chris Lattner
295e7870b4
Use the function name matcher autogenerated from the .td file.
...
llvm-svn: 26664
2006-03-09 20:35:01 +00:00
Chris Lattner
1768e6c7b3
This rule also depends on tblgen
...
llvm-svn: 26662
2006-03-09 20:29:41 +00:00
Chris Lattner
dc7268f6a3
remove dbg_declare, it's not used yet.
...
llvm-svn: 26659
2006-03-09 20:02:42 +00:00
Chris Lattner
f7471a3621
silly case insensitive file systems...
...
llvm-svn: 26658
2006-03-09 19:55:06 +00:00
Chris Lattner
617ab88e17
Build intrinsics.gen from intrinsics.td
...
llvm-svn: 26657
2006-03-09 19:53:27 +00:00
Chris Lattner
f133cc059f
autoupgrade memcpy/memmove/memset with signed counts.
...
CVS: ----------------------------------------------------------------------
llvm-svn: 26654
2006-03-09 18:42:10 +00:00
Chris Lattner
b1102a7864
add a new helper method.
...
llvm-svn: 26618
2006-03-08 18:39:13 +00:00
Jim Laskey
a1ad999bba
Get rid of the multiple copies of getStringValue. Now a Constant:: method.
...
llvm-svn: 26616
2006-03-08 18:11:07 +00:00
Chris Lattner
2c6a3f04e9
Unbreak autouprade of llvm.sqrt, simplify some code.
...
llvm-svn: 26506
2006-03-03 16:31:22 +00:00
Chris Lattner
999aa36a04
remove the read/write port/io intrinsics.
...
llvm-svn: 26479
2006-03-03 00:19:58 +00:00
Chris Lattner
c8da528e6c
Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
...
PR709, and paving the way for future progress.
Significantly refactor autoupgrading code, to handle the more complex case
(where we upgrade one argument in a function), and fix some bugs in it.
Testcase here: llvm/test/Regression/Bytecode/memcpy.ll
llvm-svn: 26474
2006-03-02 23:58:40 +00:00
Evan Cheng
dd066eac71
Back out my last check-in. Wrong place to fix it.
...
llvm-svn: 26462
2006-03-01 22:17:00 +00:00
Evan Cheng
25ecfb9411
AsmWriter should not print LLVM constant in comment. Assembler won't like
...
multi-line comments.
llvm-svn: 26461
2006-03-01 22:00:59 +00:00
Jim Laskey
64fdd3498f
Pretty print large struct constants.
...
llvm-svn: 26400
2006-02-27 10:33:53 +00:00
Jim Laskey
0ba89a0a4c
Reverting. Didn't realize some developers were embedding constants in their
...
target assembler code gen.
llvm-svn: 26383
2006-02-26 10:16:05 +00:00
Jim Laskey
8ad04a557b
Format large struct constants for readability.
...
llvm-svn: 26379
2006-02-25 12:27:03 +00:00
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