Commit Graph

183 Commits

Author SHA1 Message Date
Reid Spencer
4fe16d607d Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 18:21:29 +00:00
Reid Spencer
78d033e086 For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 07:24:44 +00:00
Reid Spencer
affaf07bf8 Do not allow packed types for icmp and fcmp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32865 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 05:22:18 +00:00
Reid Spencer
79e21d338c For PR950:
Change signed integer type names to unsigned equivalents.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32780 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:26:44 +00:00
Reid Spencer
e4d87aa2de For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 06:05:41 +00:00
Chris Lattner
62d75e7695 Fix Regression/Verifier/invoke-1.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 21:20:13 +00:00
Chris Lattner
19591b3aaf Revert the previous patch which was incorrect. This unbreaks eon, but rebreaks
invoke-1.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32718 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 19:50:15 +00:00
Reid Spencer
c597a888c0 Remove a useless statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 23:40:19 +00:00
Reid Spencer
d71b620c6c For PR1042:
Fix a thinko. We want to check the second case if the first cast *didn't*
trigger.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32657 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 21:56:29 +00:00
Chris Lattner
e3cbe03d13 Fix PR1042, by tightening up the subtle rules with invoke value use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32624 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 02:25:35 +00:00
Chris Lattner
4d17caadbc only check non-external functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32530 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 04:45:46 +00:00
Chris Lattner
41af719526 Reject attempts to define intrinsics. This fixes PR1047 and
Regression/Verifier/2006-12-12-IntrinsicDefine.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32529 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 04:30:37 +00:00
Bill Wendling
1a097e30d3 Don't use <sstream> in Streams.h but <iosfwd> instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32340 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 23:41:45 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Chris Lattner
3749c9cae4 Remove the 'printname' argument to WriteAsOperand. It is always true, and
passing false would make the asmprinter fail anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32264 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:16:21 +00:00
Bill Wendling
8f48766286 Changed to using LLVM streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31955 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 02:09:03 +00:00
Reid Spencer
3da59db637 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-27 01:05:10 +00:00
Reid Spencer
45fb3f3cb2 For PR950:
First in a series of patches to convert SetCondInst into ICmpInst and
FCmpInst using only two opcodes and having the instructions contain their
predicate value. Nothing uses these classes yet. More patches to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31867 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-20 01:22:35 +00:00
Reid Spencer
b83eb6447b For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Anton Korobeynikov
bcb9770efe Added some eye-candy for Subtarget type checking
Added X86 StdCall & FastCall calling conventions. Codegen will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 20:25:45 +00:00
Anton Korobeynikov
b74ed07bfd Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 18:23:27 +00:00
Chris Lattner
7f8897f22e eliminate RegisterOpt. It does the same thing as RegisterPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:42:52 +00:00
Chris Lattner
a4f0b3a084 s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29911 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 12:54:02 +00:00
Reid Spencer
7107c3badf For PR780:
1. Move IncludeFile.h to System library
2. Move IncludeFile.cpp to System library
3. #1 and #2 required to prevent cyclic library dependencies for libSystem
4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h
5. Add IncludeFile support to various lib/System classes.
6. Add new lib/System classes to LinkAllVMCore.h
All this in an attempt to pull in lib/System to what's required for VMCore


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 16:18:00 +00:00
Chris Lattner
f4ea921cc7 Fix PR826, testcase here: Regression/Verifier/2006-07-11-StoreStruct.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29112 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 20:29:49 +00:00
Chris Lattner
05ac92ca7d Change the verifier to never throw an exception. Instead verifyModule canoptionally return the string error, which is an easier api for clients touse anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29017 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 18:02:27 +00:00
Chris Lattner
f190d38055 Use hidden visibility to reduce the sizes of some .o files. This chops 60K off a release llvm-dis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28969 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 21:38:54 +00:00
Chris Lattner
80105ddf51 csret functions can be varargs (as can target cc's). Verify restrictions on
csret functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28405 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 21:25:17 +00:00
Chris Lattner
ff8953ae6d remove dead var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 18:34:36 +00:00
Chris Lattner
1cbe05b208 Use the isValidOperands helper instead of duplicating checking code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27524 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-08 04:07:52 +00:00
Chris Lattner
00f1023cf8 Add shufflevector support, todo, implement better constant folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27510 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-08 01:18:18 +00:00
Jeff Cohen
4c5701d271 Fix build breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27292 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 07:22:05 +00:00
Chris Lattner
536a9d5ea5 Add a new method to verify intrinsic function prototypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27282 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 04:46:47 +00:00
Chris Lattner
3b816b7aa7 Use the autogenerated intrinsic verifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 22:06:04 +00:00
Chris Lattner
59bcce5ae5 remove dbg_declare, it's not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:02:42 +00:00
Chris Lattner
41edaa0529 remove the read/write port/io intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26479 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 00:19:58 +00:00
Chris Lattner
ffa987d3ee 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26474 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-02 23:58:40 +00:00
Chris Lattner
3188b73642 Make sure the only user of InlineAsm's are direct calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25626 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 00:08:45 +00:00
Reid Spencer
d615bd9013 Don't accept the ctpop, cttz, or ctlz intrinsics with signed arguments. The
interface requires unsigned arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25433 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 01:20:03 +00:00
Robert Bocchino
c152f9cd26 VMCore support for the insertelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25408 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 20:07:22 +00:00
Reid Spencer
0b118206bf 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:12:35 +00:00
Chris Lattner
e2ba1b32ec Thanks to Daniel Berlin's ETForest fix, we can now use it again for the verifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25345 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 21:58:50 +00:00
Chris Lattner
14c02b752a ET-Forest has issues with unreachable blocks. Temporarily disable verifiers use
of it until they are resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25341 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 20:00:51 +00:00
Nate Begeman
6fb3bd6a65 Add bswap intrinsics as documented in the Language Reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 01:25:24 +00:00
Chris Lattner
71d0e3de8d Add recognition and verification of new llvm.stacksave/llvm.stackrestore intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25266 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:15:39 +00:00
Chris Lattner
0b2192c99b Convert the verifier over to use ETForest instead of DominatorSet. Patch
by Daniel Berlin


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25242 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 06:17:59 +00:00
Robert Bocchino
b52ee7f5ff Added support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25181 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:05:34 +00:00
Chris Lattner
b9d4100f32 Get logical operations to like packed types, allow BinOp::getNot to create
the right vector of -1's as its operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24906 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 18:22:19 +00:00
Andrew Lenharth
51b8d54922 continued readcyclecounter support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24300 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 16:47:30 +00:00
Andrew Lenharth
558bc88a00 core changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:34:52 +00:00