Chris Lattner
fc11ee35c5
add proper asmwriter and asmparser support for anonymous functions.
...
llvm-svn: 64953
2009-02-18 21:48:13 +00:00
Dan Gohman
0e73582689
Eliminate several more unnecessary intptr_t casts.
...
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Duncan Sands
ed1ea7cfe8
Reapply r64301. These uses of "inline" can cause strange
...
link-time failures when building with optimization. Just
get rid of them.
llvm-svn: 64449
2009-02-13 09:42:34 +00:00
Nate Begeman
8b548c0a9e
Add suppport for ConstantExprs of shufflevectors whose result type is not equal to the
...
type of the vectors being shuffled.
llvm-svn: 64401
2009-02-12 21:28:33 +00:00
Bill Wendling
dfb5880317
Revert r64300 and r64301. These were causing the following errors respectively:
...
During llvm-gcc bootstrap:
Undefined symbols:
"llvm::FPPassManager::doFinalization(llvm::Module&)", referenced from:
(anonymous namespace)::CGPassManager::doFinalization(llvm::CallGraph&, llvm::Module&)
in libLLVMipa.a(CallGraphSCCPass.o)
"llvm::FPPassManager::doInitialization(llvm::Module&)", referenced from:
(anonymous namespace)::CGPassManager::doInitialization(llvm::CallGraph&, llvm::Module&)
in libLLVMipa.a(CallGraphSCCPass.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/obj-llvm/Release/bin/opt] Error 1
During an LLVM release build:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-register-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction names with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-enums -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrNames.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction information with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td assembly writer with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-asm-writer -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenAsmWriter.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Compiling InstructionCombining.cpp for Release build
if /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-g++-4.2 -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-exceptions -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -c -MMD -MP -MF "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.lo" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d" /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar/InstructionCombining.cpp -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o ; \
then /bin/mv -f "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Trans
llvm-svn: 64311
2009-02-11 18:19:24 +00:00
Duncan Sands
4f3619a28a
These uses of "inline" can cause strange link-time
...
failures when building with optimization. Just get
rid of them.
llvm-svn: 64301
2009-02-11 12:25:15 +00:00
Dan Gohman
8adedd1086
Don't print extra spaces in vector and array constants. This makes
...
them visually more consistent with vector and array types.
llvm-svn: 64267
2009-02-11 00:25:25 +00:00
Gabor Greif
5de6cc843a
make sure that BranchInst::getSuccessor() does not assert in cast<>
...
even if the underlying operand is NULL. This may happen in debugging context
within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll).
After this fix I can resubmit the (backed out) r63459:
* lib/VMCore/AsmWriter.cpp: use precise accessors.
llvm-svn: 64142
2009-02-09 15:45:06 +00:00
Dale Johannesen
fa28929927
Reapply 63765. Patches for clang and llvm-gcc to follow.
...
llvm-svn: 63812
2009-02-05 01:49:45 +00:00
Dale Johannesen
f6e1822ccd
Reverting 63765. This broke the build of both clang
...
and llvm-gcc.
llvm-svn: 63786
2009-02-04 22:47:25 +00:00
Nate Begeman
66f10b55ed
New feature: add support for target intrinsics being defined in the
...
target directories themselves. This also means that VMCore no longer
needs to know about every target's list of intrinsics. Future work
will include converting the PowerPC target to this interface as an
example implementation.
llvm-svn: 63765
2009-02-04 19:47:21 +00:00
Duncan Sands
6b95b76bca
Allow the inverse transform x86_fp80 -> i80 (also
...
fires during the Ada build).
llvm-svn: 63731
2009-02-04 11:17:06 +00:00
Duncan Sands
528bb91ea8
Fix PR3468: a crash when constant folding a bitcast of
...
i80 to x86 long double (this was presumably generated
by sroa).
llvm-svn: 63730
2009-02-04 10:17:14 +00:00
Chris Lattner
e15f499f9d
reject things like: zext <4 x i32> %tmp to i256
...
llvm-svn: 63504
2009-02-02 07:40:17 +00:00
Gabor Greif
414be71cd6
back out my previous change, it exposes a latent bug. investigating
...
llvm-svn: 63463
2009-01-31 01:31:59 +00:00
Gabor Greif
90bf8d1c4b
use precise accessors
...
llvm-svn: 63459
2009-01-31 00:58:14 +00:00
Duncan Sands
aee16d4916
Rename getAnalysisToUpdate to getAnalysisIfAvailable.
...
llvm-svn: 63198
2009-01-28 13:14:17 +00:00
Gabor Greif
fbd40904c1
Simplify the logic of getting hold of a PHI predecessor block.
...
There is now a direct way from value-use-iterator to incoming block in PHINode's API.
This way we avoid the iterator->index->iterator trip, and especially the costly
getOperandNo() invocation. Additionally there is now an assertion that the iterator
really refers to one of the PHI's Uses.
llvm-svn: 62869
2009-01-23 19:40:15 +00:00
Dale Johannesen
a5699a1e8b
Do not use host floating point types when emitting
...
ASCII IR; loading and storing these can change the
bits of NaNs on some hosts. Remove or add warnings
at a few other places using host floating point;
this is a bad thing to do in general.
llvm-svn: 62712
2009-01-21 20:32:55 +00:00
Dale Johannesen
6854f86296
Make special cases (0 inf nan) work for frem.
...
Besides APFloat, this involved removing code
from two places that thought they knew the
result of frem(0., x) but were wrong.
llvm-svn: 62645
2009-01-21 00:35:19 +00:00
Chris Lattner
8c8234435a
div/rem by zero and div/rem overflow are both undefined according to
...
langref. Constant fold them to undef instead of trying to preserve
the trap. This fixes PR3354.
llvm-svn: 62534
2009-01-19 21:55:26 +00:00
Devang Patel
50ac518b6c
Verify Intrinsic::dbg_declare.
...
llvm-svn: 62526
2009-01-19 21:00:48 +00:00
Rafael Espindola
0aba6c9435
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Nuno Lopes
db7a9e291a
add comment to explain my previous commit, as asked by Chris
...
llvm-svn: 62272
2009-01-15 18:40:57 +00:00
Nuno Lopes
d6f4c31eea
fix crash in the case when some arg is null
...
llvm-svn: 62236
2009-01-14 17:51:41 +00:00
Chris Lattner
70d79bbe85
add a new insertAfter method, patch by Tom Jablin!
...
llvm-svn: 62158
2009-01-13 07:43:51 +00:00
Rafael Espindola
2fed481c49
Remove some dead code from the days llvm had type planes.
...
There might be more dead code, but with llvm-gcc bootstrap broken on linux x86-64 it is had to test :-(
llvm-svn: 62088
2009-01-12 15:53:25 +00:00
Chris Lattner
a844423a1b
make tblgen emit the entire Intrinsic::getAttributes method,
...
not a random piece of it. No functionality change.
llvm-svn: 62066
2009-01-12 01:18:58 +00:00
Gabor Greif
20c5fd503d
simplify CallSite helper class to not consult the Instruction's
...
opcode on each delegation.
Instead the information is cached on construction and the cached flag used thereafter.
Introduced two predicates: isCall and isInvoke.
llvm-svn: 62055
2009-01-11 22:33:22 +00:00
Nick Lewycky
4d1c04a4ea
Use the spiffy new getAlignmentFromAttrs function.
...
llvm-svn: 62039
2009-01-11 17:02:06 +00:00
Misha Brukman
71c7e40966
Removed trailing whitespace from Makefiles.
...
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Duncan Sands
51e12762d5
Use mayBeOverridden here, in anticipation of the
...
day when more linkage types will be handled.
llvm-svn: 61944
2009-01-08 20:55:49 +00:00
Bob Wilson
4a5897fc16
Fix failure messages in Verifier::PerformTypeCheck. The argument numbers
...
passed in to this function changed to support multiple return values,
leading to some incorrect argument numbers in the failure messages.
With this change, the ArgNo values used for return values and parameters are
disjoint, and the new IntrinsicParam function translates those ArgNo values
to strings that can be used in the messages. This also fixes a few places
where PerformTypeCheck did not return false following calls to CheckFailed.
llvm-svn: 61903
2009-01-08 01:56:06 +00:00
Oscar Fuentes
b7928f1380
CMake: removed lib/VMCore/DebugInfoBuilder.cpp.
...
llvm-svn: 61900
2009-01-08 00:18:52 +00:00
Bob Wilson
1d703391e7
Assert that VectorType::getTruncatedElementVectorType is not used with
...
odd bit-width vector elements. Add a check in the verifier for this also.
llvm-svn: 61899
2009-01-07 23:44:27 +00:00
Chris Lattner
0e3c4e89eb
remove DebugInfoBuilder, it has been subsumed by Analysis/DebugInfo.h
...
llvm-svn: 61898
2009-01-07 23:25:06 +00:00
Bob Wilson
98fdf706f7
Improve support for type-generic vector intrinsics by teaching TableGen how
...
to handle LLVMMatchType intrinsic parameters, and by adding new subclasses
of LLVMMatchType to match vector types with integral elements that are
either twice as wide or half as wide as the elements of the matched type.
llvm-svn: 61834
2009-01-07 00:09:01 +00:00
Dan Gohman
8271066844
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Gabor Greif
29126c8ad0
another fix to my previous commit:
...
* some picky <g> compilers get insulted by const-incorrectness
* respect 80-char limit
llvm-svn: 61701
2009-01-05 17:19:25 +00:00
Gabor Greif
21349e4801
eliminate tabs from my previous commit
...
llvm-svn: 61695
2009-01-05 16:28:14 +00:00
Gabor Greif
3b91310e36
Get rid of the tagging functions and use PointerIntPair.
...
This means that we have to include an additional header.
This patch should be functionally equivalent. I cannot outrule any performance
degradation, though I do not expect any.
llvm-svn: 61694
2009-01-05 16:05:32 +00:00
Chris Lattner
58f10e0439
tighten up return type check
...
llvm-svn: 61677
2009-01-05 07:58:59 +00:00
Nick Lewycky
6ee6b1d3e2
Add a mechanism to specify attributes in getOrInsertFunction.
...
llvm-svn: 61645
2009-01-04 22:54:40 +00:00
Chris Lattner
f28c74870f
Reimplement the old and horrible bison parser for .ll files with a nice
...
and clean recursive descent parser.
This change has a couple of ramifications:
1. The parser code is about 400 lines shorter (in what we maintain, not
including what is autogenerated).
2. The code should be significantly faster than the old code because we
don't have to work around bison's poor handling of datatypes with
ctors/dtors. This also makes the code much more resistant to memory
leaks.
3. We now get caret diagnostics from the .ll parser, woo.
4. The actual diagnostics emited from the parser are completely different
so a bunch of testcases had to be updated.
5. I now disallow "%ty = type opaque %ty = type i32". There was no good
reason to support this, it was just an accident of the old
implementation. I have no reason to think that anyone is actually using
this.
6. The syntax for sticking a global variable has changed to make it
unambiguous. I don't think anyone is depending on this since only clang
supports this and it is not solid yet, so I'm not worried about anything
breaking.
7. This gets rid of the last use of bison, and along with it the .cvs files.
I'll prune this from the makefiles as a subsequent commit.
There are a few minor cleanups that can be done after this commit (suggestions
welcome!) but this passes dejagnu testing and is ready for its time in the
limelight.
llvm-svn: 61558
2009-01-02 07:01:27 +00:00
Duncan Sands
03192120cc
Don't analyze arguments already marked 'nocapture'.
...
llvm-svn: 61532
2008-12-31 18:08:59 +00:00
Duncan Sands
f7fb4d197c
Make stripPointerCasts and getUnderlyingObject
...
non-recursive.
llvm-svn: 61479
2008-12-29 21:06:19 +00:00
Chris Lattner
befcb38427
select constant exprs should have the same constraints as select instructions,
...
notably, they should support vectors and aggregates.
llvm-svn: 61462
2008-12-29 00:16:12 +00:00
Chris Lattner
031a666948
move select validation logic into a shared place where the select ctor,
...
verifier, asm parser, etc can share it.
llvm-svn: 61461
2008-12-29 00:12:50 +00:00
John Criswell
b7e13addf7
The fields for the stoppoint debug intrinsic have not changed, so update the
...
version number assertions.
llvm-svn: 61257
2008-12-19 19:56:36 +00:00
Gordon Henriksen
1f4a555efc
C bindings for dyn_cast_or_null.
...
This operation can be used to build dyn_cast, isa, and cast.
llvm-svn: 61252
2008-12-19 18:39:45 +00:00