Bob Wilson
97b9312663
Revert r85346 change to control tail merging by CodeGenOpt::Level.
...
I'm going to redo this using the OptimizeForSize function attribute.
llvm-svn: 85426
2009-10-28 20:46:46 +00:00
Victor Hernandez
0d025421cd
Extend getMallocArraySize() to determine the array size if the malloc argument is:
...
ArraySize * ElementSize
ElementSize * ArraySize
ArraySize << log2(ElementSize)
ElementSize << log2(ArraySize)
Refactor isArrayMallocHelper and delete isSafeToGetMallocArraySize, so that there is only 1 copy of the malloc array determining logic.
Update users of getMallocArraySize() to not bother calling isArrayMalloc() as well.
llvm-svn: 85421
2009-10-28 20:18:55 +00:00
Viktor Kutuzov
fd7ddd9c69
Fix to pass options from Gold plugin to LTO codegen
...
llvm-svn: 85419
2009-10-28 18:55:55 +00:00
Benjamin Kramer
c1ba4c2941
Teach cmake that mk[sd]temp is defined in stdlib.h on some systems.
...
This fixes parallel build with clang on glibc platforms.
llvm-svn: 85414
2009-10-28 18:37:31 +00:00
David Goodwin
e30ed53c05
Make AntiDepReg.h internal.
...
llvm-svn: 85412
2009-10-28 18:29:54 +00:00
Bob Wilson
73789b848d
Add a Thumb BRIND pattern. Change the ARM BRIND assembly to separate the
...
opcode and operand with a tab. Check for these instructions in the usual
places.
llvm-svn: 85411
2009-10-28 18:26:41 +00:00
Evan Cheng
6203c6868f
fconsts and fconstd are obviously re-materializable.
...
llvm-svn: 85410
2009-10-28 18:19:56 +00:00
Jim Grosbach
294aea709e
Cleanup now that frame index scavenging via post-pass is working for ARM and Thumb2.
...
llvm-svn: 85406
2009-10-28 17:33:28 +00:00
Devang Patel
ffd561bc2d
llvm.dbg.global_variables do not exist anymore.
...
llvm-svn: 85402
2009-10-28 16:51:52 +00:00
Chris Lattner
fbaac77c70
add a new 'SetCurrentDebugType' API (requested by Andrew Haley for JIT
...
stuff) to programmatically control the current debug flavor. While
I'm at it, doxygenate Debug.h and clean it up.
llvm-svn: 85395
2009-10-28 15:32:19 +00:00
Dan Gohman
14ca753e28
Don't call SDNode::isPredecessorOf when it isn't necessary. If the load's
...
chains have no users, they can't be predecessors of the condition.
llvm-svn: 85394
2009-10-28 15:28:02 +00:00
Dan Gohman
57780dfdfc
Simplify this code: if the unfolded load can't be hoisted, just delete
...
the new instructions and leave the old one in place.
llvm-svn: 85393
2009-10-28 15:23:36 +00:00
Edward O'Callaghan
1042ca112f
No newline at end of file.
...
llvm-svn: 85390
2009-10-28 15:04:53 +00:00
Benjamin Kramer
ecc60b80b0
Update CMake file.
...
llvm-svn: 85389
2009-10-28 13:29:18 +00:00
Gabor Greif
03ab4dcff9
use metavariable <result> instead of SSA name %result for consistency
...
llvm-svn: 85388
2009-10-28 13:14:50 +00:00
Gabor Greif
bd0328f668
ooops, SSA name should not be part of the link
...
llvm-svn: 85387
2009-10-28 13:05:07 +00:00
Gabor Greif
f50fd57543
advertise new syntax for unnamed instructions
...
and eliminate confusing double-use of SSA names
(work in progress)
llvm-svn: 85385
2009-10-28 09:21:30 +00:00
Owen Anderson
2b2bd28973
Treat lifetime begin/end markers as allocations/frees respectively for the
...
purposes for GVN/DSE.
llvm-svn: 85383
2009-10-28 07:05:35 +00:00
Nick Lewycky
175308c43e
Add ABCD, a generalized implementation of the Elimination of Array Bounds
...
Checks on Demand algorithm which looks at arbitrary branches instead of loop
iterations. This is GSoC work by Andre Tavares with only editorial changes
applied!
llvm-svn: 85382
2009-10-28 07:03:15 +00:00
Evan Cheng
ec6d7c945d
Give ARMISD::EH_SJLJ_LONGJMP and EH_SJLJ_SETJMP names.
...
llvm-svn: 85381
2009-10-28 06:55:03 +00:00
Owen Anderson
fc16e5a98f
Be more careful about invariance reasoning on "store" queries. Stores still need
...
to depend on Ref and ModRef calls within the invariant region.
llvm-svn: 85380
2009-10-28 06:30:52 +00:00
Evan Cheng
f64db3e1d0
X86 palignr intrinsics immediate field is in bits. ISel must transform it into bytes.
...
llvm-svn: 85379
2009-10-28 06:30:34 +00:00
Owen Anderson
d0e86d57c1
Add trivial support for the invariance intrinsics to memdep. This logic is
...
purely local for now.
llvm-svn: 85378
2009-10-28 06:18:42 +00:00
Chris Lattner
5956dc87d3
add bitcode reader support for blockaddress. We can now fully
...
round trip blockaddress through .ll and .bc files, so add a testcase.
There are still a bunch of places in the optimizer and other places
that need to be updated to work with these constructs, but at least
the basics are in now.
llvm-svn: 85377
2009-10-28 05:53:48 +00:00
Chris Lattner
f540d74b58
bitcode writer support for blockaddress.
...
llvm-svn: 85376
2009-10-28 05:24:40 +00:00
Chris Lattner
a91a563530
Previously, all operands to Constant were themselves constant.
...
In the new world order, BlockAddress can have a BasicBlock operand.
This doesn't permute much, because if you have a ConstantExpr (or
anything more specific than Constant) we still know the operand has
to be a Constant.
llvm-svn: 85375
2009-10-28 05:14:34 +00:00
Chris Lattner
c750bb62ac
doc bug spotted by apinski
...
llvm-svn: 85372
2009-10-28 04:47:06 +00:00
Chris Lattner
2cb85b4020
'static const void *X = &&y' can only be put in the
...
readonly section if a reference to the containing function
is valid in the readonly section.
llvm-svn: 85370
2009-10-28 04:12:16 +00:00
Dan Gohman
cd139c0373
Rewrite SelectionDAG::isPredecessorOf to be iterative instead of
...
recursive to avoid consuming extraordinary amounts of stack space
when processing tall graphs.
llvm-svn: 85369
2009-10-28 03:44:30 +00:00
Chris Lattner
3432c62d93
full asmparser support for blockaddress. We can now do:
...
$ llvm-as foo.ll -d -disable-output
which reads and prints the .ll file. BC encoding is the
next project. Testcase will go in once that works.
llvm-svn: 85368
2009-10-28 03:39:23 +00:00
Chris Lattner
214cc709bc
asmprinter support for BlockAddress.
...
llvm-svn: 85367
2009-10-28 03:38:12 +00:00
Chris Lattner
3a39530445
when we tear down a module, we need to be careful to
...
zap BlockAddress values.
llvm-svn: 85366
2009-10-28 03:37:35 +00:00
Chris Lattner
1c4b03c2d7
basic blocks can now have non-instruction users.
...
llvm-svn: 85365
2009-10-28 03:36:44 +00:00
Dan Gohman
1b44f10ff4
Teach MachineLICM to unfold loads from constant memory from
...
otherwise unhoistable instructions in order to allow the loads
to be hoisted.
llvm-svn: 85364
2009-10-28 03:21:57 +00:00
Evan Cheng
4a609f3cef
Use fconsts and fconstd to materialize small fp constants.
...
llvm-svn: 85362
2009-10-28 01:44:26 +00:00
Evan Cheng
83896a59e1
Add a second ValueType argument to isFPImmLegal.
...
llvm-svn: 85361
2009-10-28 01:43:28 +00:00
Dan Gohman
4b46cbfc23
Mark dead physregdefs dead immediately. This helps MachineSink and
...
MachineLICM and other things which run before LiveVariables is run.
llvm-svn: 85360
2009-10-28 01:13:53 +00:00
Dan Gohman
75d6a4afd2
Allow constants of different types to share constant pool entries
...
if they have compatible encodings.
llvm-svn: 85359
2009-10-28 01:12:16 +00:00
Evan Cheng
deab9dee12
Remove getIEEEFloatParts and getIEEEDoubleParts. They are not needed.
...
llvm-svn: 85358
2009-10-28 01:08:17 +00:00
Dan Gohman
9c6bc1f563
Update SystemZ to use PSW following the way x86 uses EFLAGS. Besides
...
eliminating a use of MVT::Flag, this is needed for an upcoming CodeGen
change.
This unfortunately requires SystemZ to switch to the list-burr
scheduler, in order to handle the physreg defs properly, however
that's what LLVM has available at this time.
llvm-svn: 85357
2009-10-28 00:55:57 +00:00
Bob Wilson
e4b80c9bee
Add an indirect branch pattern for ARM. Testcase will be coming soon.
...
llvm-svn: 85355
2009-10-28 00:37:03 +00:00
Jeffrey Yasskin
7e30b39c67
Fix the ModuleDeletion test on PPC and ARM.
...
llvm-svn: 85352
2009-10-28 00:28:31 +00:00
Chris Lattner
d04cb6d0fa
rename indbr -> indirectbr to appease the residents of #llvm.
...
llvm-svn: 85351
2009-10-28 00:19:10 +00:00
Chris Lattner
31b132c0b7
IR support for the new BlockAddress constant kind. This is
...
untested and there is no way to use it, next up: doing battle
with asmparser.
llvm-svn: 85349
2009-10-28 00:01:44 +00:00
Bob Wilson
9693f9d465
Record CodeGen optimization level in the BranchFolding pass so that we can
...
use it to control tail merging when there is a tradeoff between performance
and code size. When there is only 1 instruction in the common tail, we have
been merging. That can be good for code size but is a definite loss for
performance. Now we will avoid tail merging in that case when the
optimization level is "Aggressive", i.e., "-O3". Radar 7338114.
Since the IfConversion pass invokes BranchFolding, it too needs to know
the optimization level. Note that I removed the RegisterPass instantiation
for IfConversion because it required a default constructor. If someone
wants to keep that for some reason, we can add a default constructor with
a hard-wired optimization level.
llvm-svn: 85346
2009-10-27 23:49:38 +00:00
Jeffrey Yasskin
f6ee7bea88
Rename lib/VMCore/ConstantsContext.h:ValueMap<> to ConstantUniqueMap<> to avoid
...
colliding with llvm/ADT/ValueMap.h:ValueMap<>.
llvm-svn: 85344
2009-10-27 23:45:55 +00:00
Bill Wendling
2e5198ff09
Add new note.
...
llvm-svn: 85341
2009-10-27 23:30:07 +00:00
Lang Hames
cd3939ef0e
Fixed a bug in the coalescer where intervals were occasionally merged despite a real interference. This fixes rdar://problem/7157961.
...
llvm-svn: 85338
2009-10-27 23:16:58 +00:00
Jim Grosbach
5607d2cb54
Enable virtual register based frame index scavenging by default for ARM & T2.
...
llvm-svn: 85335
2009-10-27 22:52:29 +00:00
Bill Wendling
fd2730ee8c
Move and clarify note.
...
llvm-svn: 85334
2009-10-27 22:48:31 +00:00
Jim Grosbach
c1403a0024
Infrastructure for dynamic stack realignment on ARM. For now, this is off by
...
default behind a command line option. This will enable better performance for
vectors on NEON enabled processors.
llvm-svn: 85333
2009-10-27 22:45:39 +00:00
Bill Wendling
2974f63cb5
Note corrected.
...
llvm-svn: 85332
2009-10-27 22:43:24 +00:00
Bill Wendling
cd4d148040
Modify note.
...
llvm-svn: 85331
2009-10-27 22:40:45 +00:00
Jeffrey Yasskin
aa8814a877
Revert the API changes from r85295 to make it easier for people to build
...
against both 2.6 and HEAD. The default is still changed to eager jitting.
llvm-svn: 85330
2009-10-27 22:39:42 +00:00
Bill Wendling
a205402c16
Add a note.
...
llvm-svn: 85329
2009-10-27 22:34:43 +00:00
Devang Patel
11cf3f4a27
Factor out redundancy from clone() implementations.
...
llvm-svn: 85327
2009-10-27 22:16:29 +00:00
Dan Gohman
a5e078b677
Update the MachineBasicBlock CFG for an indirect branch.
...
llvm-svn: 85325
2009-10-27 22:10:34 +00:00
Dan Gohman
a4374e66f0
Add CodeGen support for indirect branches.
...
llvm-svn: 85323
2009-10-27 21:56:26 +00:00
Chris Lattner
b4f2a24363
typo
...
llvm-svn: 85322
2009-10-27 21:52:54 +00:00
Chris Lattner
5c5f0ac362
you can't take the address of the entry block of a function.
...
llvm-svn: 85321
2009-10-27 21:49:40 +00:00
Chris Lattner
da37b30b21
improvements from gabor.
...
llvm-svn: 85320
2009-10-27 21:44:20 +00:00
Chris Lattner
6d8b15bebc
make the build build.
...
llvm-svn: 85319
2009-10-27 21:43:39 +00:00
Evan Cheng
67c902147e
Add new APFloat methods that return sign, exp, and mantissa of ieee float and double values.
...
llvm-svn: 85318
2009-10-27 21:35:42 +00:00
Chris Lattner
c5c281ea44
Random updates to passes for indbr, I need blockaddress before I can do much more.
...
llvm-svn: 85316
2009-10-27 21:27:42 +00:00
Chris Lattner
e8628a0206
cppbackend support for indbr
...
llvm-svn: 85312
2009-10-27 21:24:48 +00:00
Chris Lattner
42c979e8d3
CBE support for indbr.
...
llvm-svn: 85311
2009-10-27 21:21:06 +00:00
Chris Lattner
2bfd320226
fix things pointed out by Dan!
...
llvm-svn: 85310
2009-10-27 21:19:13 +00:00
Chris Lattner
e4801f7844
document the forthcoming blockaddress constant.
...
llvm-svn: 85306
2009-10-27 21:01:34 +00:00
Johnny Chen
cde65ec581
Similar to r85280, do not clear the "S" bit for RSBri and RSBrs.
...
llvm-svn: 85299
2009-10-27 20:51:49 +00:00
Devang Patel
cfeaa48642
Do not held on to DenseMap slot accross map insertion. The insertion may cause the map to grow rending the slot invalid.
...
Use this opportunity to use ValueMap instead of DenseMap.
llvm-svn: 85298
2009-10-27 20:47:17 +00:00
Johnny Chen
4f36affe5f
Set condition code bits of BL and BLr9 to 0b1110 (ALways) to distinguish between
...
BL_pred and BLr9_pred.
llvm-svn: 85297
2009-10-27 20:45:15 +00:00
Chris Lattner
26076a8f10
don't use stdio
...
llvm-svn: 85296
2009-10-27 20:42:54 +00:00
Jeffrey Yasskin
4567db45b8
Change the JIT to compile eagerly by default as agreed in
...
http://llvm.org/PR5184 , and beef up the comments to describe what both options
do and the risks of lazy compilation in the presence of threads.
llvm-svn: 85295
2009-10-27 20:30:28 +00:00
Chris Lattner
6506d6c3d7
fix pasto pointed out by Rafael
...
llvm-svn: 85294
2009-10-27 20:27:24 +00:00
Dale Johannesen
26bc62c788
Add radar number.
...
llvm-svn: 85290
2009-10-27 20:12:38 +00:00
Dale Johannesen
bda7fee4a8
Testcase for llvm-gcc patch 85284.
...
llvm-svn: 85287
2009-10-27 20:06:05 +00:00
Victor Hernandez
f390e04a47
Rename MallocFreeHelper as MemoryBuiltins
...
llvm-svn: 85286
2009-10-27 20:05:49 +00:00
Oscar Fuentes
08875d1dda
CMake: Install .inc files too.
...
llvm-svn: 85285
2009-10-27 20:04:22 +00:00
Oscar Fuentes
6997c643c6
Rather than excluding quite some things, and still installing
...
CMakeLists.txt, Makefiles, ... it's better to whitelist what we really
want to install.
Patch by Ingmar Vanhassel!
llvm-svn: 85282
2009-10-27 19:57:29 +00:00
Evan Cheng
16993aa30b
Do away with addLegalFPImmediate. Add a target hook isFPImmLegal which returns true if the fp immediate can be natively codegened by target.
...
llvm-svn: 85281
2009-10-27 19:56:55 +00:00
Bob Wilson
b5044ce5a9
Do not clear the "S" bit for RSCri and RSCrs. They inherit from the "sI"
...
instruction format that already takes care of setting this.
llvm-svn: 85280
2009-10-27 19:52:03 +00:00
Chris Lattner
3ed871fe62
add enough support for indirect branch for the feature test to pass
...
(assembler,asmprinter, bc reader+writer) and document it. Codegen
currently aborts on it.
llvm-svn: 85274
2009-10-27 19:13:16 +00:00
Johnny Chen
df5dcdaa10
Explicitly specify 0b00, i.e, zero rotation, as the rotate filed (Inst{11-10})
...
for the r/rr fragment of the multiclass AI_unary_rrot/AI_bin_rrot.
llvm-svn: 85271
2009-10-27 18:44:24 +00:00
Rafael Espindola
d92a3633e1
Add missing testcase.
...
llvm-svn: 85266
2009-10-27 17:59:03 +00:00
Chris Lattner
1ed8bb16b8
change of mind :)
...
llvm-svn: 85258
2009-10-27 17:40:49 +00:00
Sanjiv Gupta
a789f17ffc
Remove unnecessary gotos to fall-thru successors.
...
llvm-svn: 85257
2009-10-27 17:40:24 +00:00
Chris Lattner
1f8f60e62f
rename test.
...
llvm-svn: 85256
2009-10-27 17:40:19 +00:00
Johnny Chen
b678a56fef
Test commit. Added '.' to the comment line.
...
llvm-svn: 85255
2009-10-27 17:25:15 +00:00
Chris Lattner
26a7ae4fba
Type.h doesn't need to #include LLVMContext.h
...
llvm-svn: 85254
2009-10-27 17:08:31 +00:00
Chris Lattner
0997991252
pseudosourcevalue is also still using getGlobalContext(), so it isn't
...
thread safe either.
llvm-svn: 85253
2009-10-27 17:02:08 +00:00
Chris Lattner
fb22a85baf
apparently the X86 JIT isn't fully contextized, it is still using getGlobalContext() :(
...
llvm-svn: 85252
2009-10-27 17:01:03 +00:00
Nick Lewycky
d20fd59e29
Fix reversed logic spotted by Owen Anderson.
...
llvm-svn: 85251
2009-10-27 16:56:58 +00:00
Chris Lattner
4cc68c29e6
trim another #include
...
llvm-svn: 85250
2009-10-27 16:53:54 +00:00
Chris Lattner
50b41ed060
remove an unneeded #include.
...
llvm-svn: 85248
2009-10-27 16:49:53 +00:00
Edward O'Callaghan
f96ce30236
Convert Analysis tests to FileCheck in regards to PR5307.
...
llvm-svn: 85241
2009-10-27 14:54:46 +00:00
Rafael Espindola
d90d169f9d
Correctly align double arguments in the stack.
...
llvm-svn: 85235
2009-10-27 14:09:44 +00:00
Mikhail Glushenkov
b7f7673feb
80-col violation.
...
llvm-svn: 85215
2009-10-27 09:02:49 +00:00
Bob Wilson
3d43b38f0f
Fix Thumb2 failures by converting them to FileCheck.
...
llvm-svn: 85210
2009-10-27 06:31:02 +00:00
Bob Wilson
d169e6c281
Fix the rest of the ARM failures by converting them to FileCheck.
...
llvm-svn: 85208
2009-10-27 06:16:45 +00:00
Bob Wilson
04580c8307
Fix some more failures by converting to FileCheck.
...
llvm-svn: 85207
2009-10-27 05:50:28 +00:00