Chris Lattner
392da9c56d
simplify .td file
...
llvm-svn: 73542
2009-06-16 20:04:21 +00:00
Dan Gohman
0ed7756fbe
Generalize a few more instcombines to be vector/scalar-independent.
...
llvm-svn: 73541
2009-06-16 19:55:29 +00:00
Dan Gohman
1ee696d8fc
Instcombine's ShrinkDemandedConstant may strip bits out of constants,
...
obscuring what would otherwise be a low-bits mask. Use ComputeMaskedBits
to compute what ShrinkDemandedConstant knew about to reconstruct a
low-bits mask value.
llvm-svn: 73540
2009-06-16 19:52:01 +00:00
Evan Cheng
0d9730f39f
CALL64pcrel32 immediate field is 32-bit. Patch by Abhinav Duggal.
...
llvm-svn: 73536
2009-06-16 19:44:27 +00:00
Anton Korobeynikov
a8fd40b50a
Address review comments: add 3 ARM calling conventions.
...
Dispatch C calling conv. to one of these conventions based on
target triple and subtarget features.
llvm-svn: 73530
2009-06-16 18:50:49 +00:00
Anton Korobeynikov
5d28cb204f
GNU as refuses to assemble "pop {}" instruction. Do not emit such
...
(this is the case when we have thumb vararg function with single
callee-saved register, which is handled separately).
llvm-svn: 73529
2009-06-16 18:49:08 +00:00
Fariborz Jahanian
4be3f263c7
Add -Wundeclared-selector to -Wmost options group.
...
llvm-svn: 73524
2009-06-16 18:20:59 +00:00
Owen Anderson
a149e22c09
Add a configure check for pthread_rwlock_init.
...
llvm-svn: 73523
2009-06-16 18:20:20 +00:00
Owen Anderson
4741b5782a
Update the threading section to reflect current plans/implementation.
...
llvm-svn: 73521
2009-06-16 18:04:19 +00:00
Devang Patel
9fc4341eec
It is possible that main input file does not have any symbol with debug info. To handle this edge case, always create main compile unit first.
...
This fixes PR 4228.
llvm-svn: 73520
2009-06-16 18:02:02 +00:00
Fariborz Jahanian
bada785729
Test case was left behind from my last patch.
...
llvm-svn: 73519
2009-06-16 17:57:28 +00:00
Ted Kremenek
50d131dea1
Update checker build.
...
llvm-svn: 73518
2009-06-16 17:45:57 +00:00
Douglas Gregor
c791c37633
Add Threading.cpp to the CMake project files
...
llvm-svn: 73516
2009-06-16 17:45:38 +00:00
Owen Anderson
eb105f99ec
Fix validation errors.
...
llvm-svn: 73515
2009-06-16 17:40:28 +00:00
Chris Lattner
943658f00b
testcase for r72869, it turns out that it happens in Ruby.
...
llvm-svn: 73514
2009-06-16 17:39:02 +00:00
Owen Anderson
4cb4b6191a
Split the thread-related APIs out into their own file, and add a few more
...
calls for convenience.
llvm-svn: 73512
2009-06-16 17:33:51 +00:00
Chris Lattner
651a221cc2
follow-on to my patch: some targets (like sparc) do not
...
have target-specific builtins, and do not set the count.
Just default to 0 for these targets.
llvm-svn: 73510
2009-06-16 17:27:50 +00:00
Chris Lattner
22c645b337
Testcase for r73506
...
llvm-svn: 73508
2009-06-16 17:23:25 +00:00
Chris Lattner
945d08d76f
Generalize instcombine's isSafeToLoadUnconditionally() function
...
to ignore readonly calls, and factor it out of instcombine so
that it can be used by other passes. Patch by Frits van Bommel!
llvm-svn: 73506
2009-06-16 17:23:12 +00:00
Fariborz Jahanian
0571d9bbba
Implements -Wundeclared-selector for ObjC.
...
llvm-svn: 73495
2009-06-16 16:25:00 +00:00
Chris Lattner
2811a257f1
remove extraneous diff.
...
llvm-svn: 73494
2009-06-16 16:22:49 +00:00
Chris Lattner
4ef49c1d6e
my refactoring of builtins changed target-specific builtins to only be
...
registered when PCH wasn't being used. We should always install (in BuiltinInfo)
information about target-specific builtins, but we shouldn't register any builtin
identifier infos. This fixes the build of apps that use PCH and target specific
builtins together.
llvm-svn: 73492
2009-06-16 16:18:48 +00:00
Sanjiv Gupta
05a7dba3bd
Added missing libcalls for floating point to int conversions.
...
llvm-svn: 73491
2009-06-16 16:17:35 +00:00
Eli Friedman
8bc032c97c
Remove the "llvm.umul.with.overflow is broken" warning; it should be
...
essentially working now, at least for common cases, and it shouldn't
silently generate bad code.
llvm-svn: 73484
2009-06-16 10:24:13 +00:00
Sanjiv Gupta
bce3ca6ad9
Fixed names of libcalls checked in r73480.
...
llvm-svn: 73483
2009-06-16 10:22:58 +00:00
Zhongxing Xu
838a0db0ba
Use canonical type for building ElementRegion. Otherwise ElementRegions cannot
...
be unique.
llvm-svn: 73482
2009-06-16 09:55:50 +00:00
Sanjiv Gupta
5372d4a568
Code Restructuring. No functionality change.
...
llvm-svn: 73481
2009-06-16 09:45:18 +00:00
Sanjiv Gupta
557ed09e0f
Added required libcalls for PIC16 (mostly floating points to integer casting operations).
...
llvm-svn: 73480
2009-06-16 09:03:58 +00:00
Evan Cheng
591bcad8b9
Rename RemoveCopiesFromValNo to TurnCopiesFromValNoToImpDefs.
...
llvm-svn: 73479
2009-06-16 07:15:05 +00:00
Evan Cheng
cc21a5415a
If a val# is defined by an implicit_def and it is being removed, all of the copies off the val# were removed. This causes problem later since the scavenger will see uses of registers without defs. The proper solution is to change the copies into implicit_def's instead.
...
TurnCopyIntoImpDef turns a copy into implicit_def and remove the val# defined by it. This causes an scavenger assertion later if the def reaches other blocks. Disable the transformation if the value live interval extends beyond its def block.
llvm-svn: 73478
2009-06-16 07:12:58 +00:00
Eli Friedman
abfad5d61e
Add some generic expansion logic for SMULO and UMULO. Fixes UMULO
...
support for x86, and UMULO/SMULO for many architectures, including PPC
(PR4201), ARM, and Cell. The resulting expansion isn't perfect, but it's
not bad.
llvm-svn: 73477
2009-06-16 06:58:29 +00:00
Eli Friedman
48021d15d6
Misc accumulated tweaks to legalization logic for various targets.
...
llvm-svn: 73476
2009-06-16 06:40:59 +00:00
Zhongxing Xu
e531f048f8
Do not invalidate unboundable regions in GRSimpleVals::EvalCall().
...
llvm-svn: 73474
2009-06-16 06:18:21 +00:00
Chris Lattner
0101f45785
another xform that is target-independent (should be done in instcombine).
...
llvm-svn: 73472
2009-06-16 06:15:56 +00:00
Chris Lattner
aba55a69b1
I think instcombine should unconditionally do this xform.
...
llvm-svn: 73471
2009-06-16 06:11:35 +00:00
Chris Lattner
06310bf178
Fix PR4336: Iterating over use-def chains doesn't seem to be deterministic.
...
The problem was that BitcodeReader::materializeModule would read functions
from the bc file in densemap pointer key order (doubly non-deterministic!),
which would cause the use-def chains to be set up for globals in
non-determinstic order. Non-determinstic use/def chains can cause
nondeterminism in many places down-stream.
Many thanks to Julien Lerouge for putting together the pass in the PR that
shows the issue!
llvm-svn: 73470
2009-06-16 05:15:21 +00:00
Bill Wendling
92b17b550e
There doesn't seem to be a reason to move the save FP stuff.
...
llvm-svn: 73468
2009-06-16 04:12:45 +00:00
Bill Wendling
f6c6a7f1b7
The DWARF to compact encoding converter assumes that the DW_CFA_def_cfa_offset
...
comes after the DW_CFA_def_cfa_register, because the CFA is really ESP from the
start of the function and only gets an offset when the "subl $xxx,%esp"
instruction happens, not the other way around.
And reapply r72898:
The DWARF unwind info was incorrect. While compiling with
`-fomit-frame-pointer', we would lack the DW_CFA_advance_loc information for a
lot of function, and then they would be `0'. The linker (at least on Darwin)
needs to encode the stack size. In some cases, the stack size is too large to
directly encode. So the linker checks to see if there is a "subl $xxx,%esp"
instruction at the point where the `DW_CFA_def_cfa_offset' says the pc was. If
so, the compact encoding records the offset in the function to where the stack
size is embedded. But because the `DW_CFA_advance_loc' instructions are missing,
it looks before the function and dies.
So, instead of emitting the EH debug label before the stack adjustment
operations, emit it afterwards, right before the frame move stuff.
llvm-svn: 73465
2009-06-16 04:06:15 +00:00
Bill Wendling
4a172428e5
Fix typos.
...
llvm-svn: 73464
2009-06-16 04:02:03 +00:00
Anders Carlsson
a42ab8f3d5
Handle temporaries in default arguments.
...
llvm-svn: 73462
2009-06-16 03:37:31 +00:00
Devang Patel
14491abe48
Use MainCU if it is available.
...
llvm-svn: 73457
2009-06-16 02:09:30 +00:00
Owen Anderson
f0ffb777d9
Add initial stab at documenting the use of LLVM with threaded clients.
...
Comments welcome!
llvm-svn: 73456
2009-06-16 01:17:16 +00:00
Dan Gohman
22d4cf60d8
Add comments to ConstantInt::get and ConstantFP::get to more fully
...
describe their behavior.
llvm-svn: 73454
2009-06-16 01:02:32 +00:00
Anders Carlsson
90036dc96a
Keep track of whether a type parameter type is a parameter pack.
...
llvm-svn: 73452
2009-06-16 00:30:48 +00:00
Dan Gohman
adfd42a3c8
Use Type::getScalarType.
...
llvm-svn: 73451
2009-06-16 00:20:26 +00:00
Steve Naroff
853308d89d
Add a comment to Sema::ActOnTranslationUnitScope().
...
llvm-svn: 73450
2009-06-16 00:20:10 +00:00
Mikhail Glushenkov
b4b44ea71c
Regenerate.
...
llvm-svn: 73449
2009-06-16 00:14:20 +00:00
Mikhail Glushenkov
bf5085251a
Documentation update.
...
llvm-svn: 73448
2009-06-16 00:13:52 +00:00
Chris Lattner
49ffbb73ce
accept and ignore -Wdiv-by-zero
...
llvm-svn: 73446
2009-06-15 23:45:43 +00:00
Owen Anderson
20fe9e6345
Remove extraneous propset.
...
llvm-svn: 73441
2009-06-15 23:12:00 +00:00