Bill Wendling
0eb23711fb
Refactor the code that does the type checking for intrinsics.
...
llvm-svn: 59228
2008-11-13 07:11:27 +00:00
Bill Wendling
f5b264a64b
Implement stack protectors as function attributes: "ssp" and "sspreq".
...
llvm-svn: 59202
2008-11-13 01:02:14 +00:00
Mon P Wang
911ee5bf8b
Added support for the following definition of shufflevector
...
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask>
llvm-svn: 58964
2008-11-10 04:46:22 +00:00
Chris Lattner
1185c9a72c
Use utohex_buffer instead of utohexstr to avoid creating a temporary
...
string in the .ll and .s printers.
llvm-svn: 58962
2008-11-10 04:30:26 +00:00
Dan Gohman
1130e8c23f
Fix a use of an invalid iterator when -debug-pass=Details is used.
...
llvm-svn: 58816
2008-11-06 21:57:17 +00:00
Bill Wendling
538cbf1e09
Add comments to function.
...
llvm-svn: 58781
2008-11-05 23:42:27 +00:00
Devang Patel
b55a78e553
Silence unused variable warnings.
...
llvm-svn: 58743
2008-11-05 01:37:40 +00:00
Nuno Lopes
a5d766c285
fix memory leak in pass manager when adding an analysis pass that already existed. as pass manager takes ownership of the added passes, it has to delete the pass if it isnt added to the pass list
...
tweak the opt tool so that it doesnt access a Pass after the ownership was taken by the pass manager
llvm-svn: 58730
2008-11-04 23:03:58 +00:00
Bill Wendling
79a8798e07
- Add a "getOrInsertGlobal" method to the Module class. This acts similarly to
...
"getOrInsertFunction" in that it either adds a new declaration of the global
and returns it, or returns the current one -- optionally casting it to the
correct type.
- Use the new getOrInsertGlobal in the stack protector code.
- Use "splitBasicBlock" in the stack protector code.
llvm-svn: 58727
2008-11-04 22:51:24 +00:00
Dan Gohman
50183113b9
Duncan pointed out that the Extended case in getTypeForMVT could
...
be considerably simplified.
llvm-svn: 58703
2008-11-04 16:19:44 +00:00
Dan Gohman
13237dda2d
Add a return statement to suppress warnings in NDEBUG builds.
...
llvm-svn: 58702
2008-11-04 16:08:57 +00:00
Dan Gohman
2dff90b025
Add some asserts to verify MVT invariant assumptions.
...
llvm-svn: 58701
2008-11-04 16:03:56 +00:00
Devang Patel
09aea7e93e
Fix unused variable warnings.
...
llvm-svn: 58653
2008-11-03 23:20:04 +00:00
Dan Gohman
3258c45d0f
Add C bindings for extractvalue and insertvalue. Patch by Frits van Bommel!
...
llvm-svn: 58650
2008-11-03 22:55:43 +00:00
Dan Gohman
edf3dc97c2
Change how extended types are represented in MVTs. Instead of fiddling
...
bits, use a union of a SimpleValueType enum and a regular Type*.
This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits.
In most cases, this doesn't add significant overhead. There are places
in codegen that use arrays of MVTs, so these are now larger, but
they're small in common cases.
This eliminates restrictions on the size of integer types and vector
types that can be represented in codegen. As the included testcase
demonstrates, it's now possible to codegen very large add operations.
There are still some complications with using very large types. PR2880
is still open so they can't be used as return values on normal targets,
there are no libcalls defined for very large integers so operations
like multiply and divide aren't supported.
This also introduces a minimal tablgen Type library, capable of
handling IntegerType and VectorType. This will allow parts of
TableGen that don't depend on using SimpleValueType values to handle
arbitrary integer and vector types.
llvm-svn: 58623
2008-11-03 17:56:27 +00:00
Sanjiv Gupta
945942c4ad
Reverting back 58505. Will commit it once I have the bc reader/writer/docs
...
ready.
llvm-svn: 58547
2008-11-01 10:57:12 +00:00
Sanjiv Gupta
5cd04857b1
For some targets pointer and int are 16-bits. Allow 16-bits as a valid index
...
in such cases.
llvm-svn: 58505
2008-10-31 10:26:20 +00:00
Daniel Dunbar
ffd2bedc44
Reuse PrintEscapedString for printing names in .ll
...
- One functionality change, '\\' in a name is now printed as a hex
escape instead of "\\\\". This is consistent with other users of
PrintEscapedString.
llvm-svn: 58343
2008-10-28 19:33:02 +00:00
Nick Lewycky
c1f8a23665
Fix an obvious copy/pasto.
...
llvm-svn: 58231
2008-10-27 07:28:44 +00:00
Bill Wendling
617f3d4b3a
Fix type-o in ExprMapKeyType::operator ==(). The "&&" was missing.
...
Patch by Frits van Bommel!
llvm-svn: 58175
2008-10-26 00:19:56 +00:00
Gordon Henriksen
e5b0182e94
Related to PR2911, reject as invalid non-pointer GC roots.
...
llvm-svn: 58143
2008-10-25 16:28:35 +00:00
Daniel Dunbar
d1169ccaf2
Move Print*Pass to use raw_ostream.
...
llvm-svn: 57946
2008-10-22 03:25:22 +00:00
Oscar Fuentes
a932cae97a
CMake: Turned some libraries into partially linked objects. Corrected
...
names of LLVMCore and ARMCodeGen.
llvm-svn: 57943
2008-10-22 02:51:53 +00:00
Oscar Fuentes
4a377fbeae
CMake: updated lib/VMCore/CMakeLists.txt
...
llvm-svn: 57937
2008-10-21 23:52:03 +00:00
Daniel Dunbar
919ce3c16a
Privatize PrintModulePass and PrintFunctionPass and add
...
createPrintModulePass and createPrintFunctionPass.
- So clients who compile w/o RTTI can use them.
llvm-svn: 57933
2008-10-21 23:33:38 +00:00
Chris Lattner
d748d12000
Keep track of *which* input constraint matches an output
...
constraint. Reject asms where an output has multiple
input constraints tied to it.
llvm-svn: 57687
2008-10-17 16:47:46 +00:00
Gabor Greif
2fa8672ee6
Introduce a typing refinenement on tagged data
...
using the 'volatile' qualifier. This should not have any operational consequences
on code, because tags should always be stripped off (giving a non-volatile pointer)
before dereferencing. The new qualification is there to catch some attempts to use
tagged pointers in a context where an untagged pointer is appropriate.
Notably this approach does not catch dereferencing of tagged pointers, but helps
in separating the two concepts a bit.
llvm-svn: 57641
2008-10-16 15:33:02 +00:00
Chris Lattner
6d79672ba0
Verify prefetch arguments, PR2576.
...
llvm-svn: 57626
2008-10-16 06:00:36 +00:00
Chris Lattner
3048ccc1f9
apply Eli's patch for PR2165 and provide a testcase.
...
llvm-svn: 57625
2008-10-16 05:26:51 +00:00
Dan Gohman
11c8a9a63a
Fix Instruction::isIdenticalTo and isSameOperationAs to recognize
...
additional information in Loads, Stores, Calls, Invokes,
InsertValueInsts, and ExtractValueInsts.
llvm-svn: 57620
2008-10-16 01:24:45 +00:00
Dan Gohman
0c160fbe89
Correct the name of isTrapping in comments.
...
llvm-svn: 57606
2008-10-15 22:56:21 +00:00
Dan Gohman
df18b6f3db
Fix a missing space after the return type in invoke statements.
...
This fixes PR2894.
llvm-svn: 57589
2008-10-15 18:02:08 +00:00
Daniel Dunbar
e11e618cc6
Prevent assert when using '"' in names (via hexadecimal).
...
Update LangRef to mention \xx quoting in names.
llvm-svn: 57538
2008-10-14 23:51:43 +00:00
Daniel Dunbar
f3b4f45878
Change getLLVMName to use raw_ostream & PrintLLVMName.
...
- Avoids duplicated quotification code.
- Remove QuoteNameIfNeeded.
- No functionality change.
llvm-svn: 57537
2008-10-14 23:28:09 +00:00
Daniel Dunbar
73ceb8010b
Unbreak DbgStopPointInst::getFileName().
...
llvm-svn: 57373
2008-10-11 06:40:56 +00:00
Dale Johannesen
075a62519f
Add a "loses information" return value to APFloat::convert
...
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.
llvm-svn: 57329
2008-10-09 23:00:39 +00:00
Dale Johannesen
9e57068854
Rename APFloat::convertToAPInt to bitcastToAPInt to
...
make it clearer what the function does. No functional
change.
llvm-svn: 57325
2008-10-09 18:53:47 +00:00
Duncan Sands
8f296a3788
Add <cstdio> include where needed by gcc-4.4.
...
Patch by Samuel Tardieu.
llvm-svn: 57291
2008-10-08 07:23:46 +00:00
Devang Patel
ca66d093c0
Remove interfaces implemented by dead pass from the list of available passes.
...
Patch By Matthijs Kooijman.
llvm-svn: 57202
2008-10-06 20:36:36 +00:00
Chris Lattner
4622ca2262
fix an incorrect and extremely confusing error message
...
llvm-svn: 57123
2008-10-05 18:24:03 +00:00
Devang Patel
0d22d8ebdb
Fix function attribute verification check.
...
Thanks Duncan!
llvm-svn: 57029
2008-10-03 21:11:02 +00:00
Devang Patel
2bed4d4ca0
Verify function attributes.
...
llvm-svn: 57020
2008-10-03 17:50:00 +00:00
Devang Patel
92bd02d528
Remove redundant check.
...
llvm-svn: 56960
2008-10-02 18:38:23 +00:00
Devang Patel
d90556aed0
Attributes noinline alwaysinline are incompatible
...
llvm-svn: 56939
2008-10-01 23:41:25 +00:00
Chris Lattner
91e5279de1
add a new form of Type::dump that takes a module for type names,
...
patch provided by Tomas Lindquist Olsen!
llvm-svn: 56929
2008-10-01 20:16:19 +00:00
Dan Gohman
e1d0930044
Make some implicit conversions explicit, to avoid compiler warnings.
...
llvm-svn: 56927
2008-10-01 19:58:59 +00:00
Duncan Sands
88d8323743
Factorize code: remove variants of "strip off
...
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject. The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.
llvm-svn: 56922
2008-10-01 15:25:41 +00:00
Dan Gohman
8ba73d6d60
Don't prepend a space character for constants in Value::print.
...
llvm-svn: 56920
2008-10-01 15:09:37 +00:00
Devang Patel
7536edca09
Support inreg, zext and sext as return value attributes.
...
llvm-svn: 56801
2008-09-29 20:49:50 +00:00
Devang Patel
47a504c87c
Implement function notes as function attributes.
...
llvm-svn: 56716
2008-09-26 23:51:19 +00:00