oota-llvm.git
15 years agoRemove std::string uses from DebugInfo interface.
Devang Patel [Tue, 29 Sep 2009 18:40:58 +0000 (18:40 +0000)]
Remove std::string uses from DebugInfo interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83083 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCreate empty StringRef is incoming cstring is NULL.
Devang Patel [Tue, 29 Sep 2009 18:39:56 +0000 (18:39 +0000)]
Create empty StringRef is incoming cstring is NULL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83082 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify the tracking of virtual frame index registers. Ranges cannot overlap,
Jim Grosbach [Tue, 29 Sep 2009 18:23:15 +0000 (18:23 +0000)]
Simplify the tracking of virtual frame index registers. Ranges cannot overlap,
so a simple "current register" will suffice. Also add some additional
sanity-checking assertions to make sure things are as we expect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83081 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMoving register scavenging to a post pass results in virtual registers in
Jim Grosbach [Tue, 29 Sep 2009 17:24:37 +0000 (17:24 +0000)]
Moving register scavenging to a post pass results in virtual registers in
the instruction we're scavenging for. The scavenger needs to know to avoid
them when analyzing register usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83077 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPost-RA regressions.
David Goodwin [Tue, 29 Sep 2009 17:10:26 +0000 (17:10 +0000)]
Post-RA regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83075 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR4687. Pre ARMv5te does not support ldrd / strd. Patch by John Tytgat.
Evan Cheng [Tue, 29 Sep 2009 07:07:30 +0000 (07:07 +0000)]
Fix PR4687. Pre ARMv5te does not support ldrd / strd. Patch by John Tytgat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83058 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegenerate.
Nick Lewycky [Tue, 29 Sep 2009 06:18:23 +0000 (06:18 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83052 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix configure bug that only shows up in a clean build. Don't try to invoke gcc
Nick Lewycky [Tue, 29 Sep 2009 06:18:00 +0000 (06:18 +0000)]
Fix configure bug that only shows up in a clean build. Don't try to invoke gcc
until after the compiler itself has been set up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83051 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRoll back r83048.
Nick Lewycky [Tue, 29 Sep 2009 05:48:51 +0000 (05:48 +0000)]
Roll back r83048.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83050 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegenerate.
Nick Lewycky [Tue, 29 Sep 2009 05:41:21 +0000 (05:41 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83048 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOn Linux, uname -m reports the kernel type. Some Linux systems are 32-bit but
Nick Lewycky [Tue, 29 Sep 2009 05:40:45 +0000 (05:40 +0000)]
On Linux, uname -m reports the kernel type. Some Linux systems are 32-bit but
with a 64-bit kernel, which confuses LLVM. Make LLVM double-check this by
checking which defines the system gcc actually sets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83047 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoParse custom metadata attached with an instruction.
Devang Patel [Tue, 29 Sep 2009 00:01:14 +0000 (00:01 +0000)]
Parse custom metadata attached with an instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83033 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoB&I's buildit forces a PATH that omits /Developer. Temporarily add
Stuart Hastings [Mon, 28 Sep 2009 23:42:38 +0000 (23:42 +0000)]
B&I's buildit forces a PATH that omits /Developer.  Temporarily add
/Developer/usr/bin to the PATH when looking for llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83028 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFor B&I-style builds, tweak build_llvm script to prefer LLVM-G++ if
Stuart Hastings [Mon, 28 Sep 2009 22:17:53 +0000 (22:17 +0000)]
For B&I-style builds, tweak build_llvm script to prefer LLVM-G++ if
available.  Override by setting CC and CXX in the environment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83024 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdjust processFunctionBeforeCalleeSavedScan() to correctly reserve a stack
Jim Grosbach [Mon, 28 Sep 2009 22:08:06 +0000 (22:08 +0000)]
Adjust processFunctionBeforeCalleeSavedScan() to correctly reserve a stack
slot for the register scavenger when compiling Thumb1 functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83023 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd C API calls for building FNeg operations. Patch by KS Sreeram!
Dan Gohman [Mon, 28 Sep 2009 21:51:41 +0000 (21:51 +0000)]
Add C API calls for building FNeg operations. Patch by KS Sreeram!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83021 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agos/class Metadata/class MetadataContext/g
Devang Patel [Mon, 28 Sep 2009 21:41:20 +0000 (21:41 +0000)]
s/class Metadata/class MetadataContext/g

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83019 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not use global typedef for MDKindID.
Devang Patel [Mon, 28 Sep 2009 21:14:55 +0000 (21:14 +0000)]
Do not use global typedef for MDKindID.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83016 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForgot to update the documentation in r82906. s/DEBUG_RUNTIME/DEBUG_SYMBOLS/.
Jeffrey Yasskin [Mon, 28 Sep 2009 21:14:38 +0000 (21:14 +0000)]
Forgot to update the documentation in r82906. s/DEBUG_RUNTIME/DEBUG_SYMBOLS/.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83015 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unnecessary include.
Devang Patel [Mon, 28 Sep 2009 21:06:38 +0000 (21:06 +0000)]
Remove unnecessary include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83013 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a testcase for r83011.
Dan Gohman [Mon, 28 Sep 2009 21:03:02 +0000 (21:03 +0000)]
Add a testcase for r83011.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83012 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen extending the operands of an addrec, iterate through all
Dan Gohman [Mon, 28 Sep 2009 21:01:47 +0000 (21:01 +0000)]
When extending the operands of an addrec, iterate through all
the operands, rather than trying to partition them into a start
and a step. This handles non-affine add recurrences correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83011 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not hardcode metadata names.
Devang Patel [Mon, 28 Sep 2009 20:56:00 +0000 (20:56 +0000)]
Do not hardcode metadata names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83010 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a CHECK line to check the position of the second divsd.
Dan Gohman [Mon, 28 Sep 2009 20:48:39 +0000 (20:48 +0000)]
Add a CHECK line to check the position of the second divsd.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83009 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix Thumb2 IT block pass bug. t2MOVi32imm may not be the start of a IT block.
Evan Cheng [Mon, 28 Sep 2009 20:47:15 +0000 (20:47 +0000)]
Fix Thumb2 IT block pass bug. t2MOVi32imm may not be the start of a IT block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83008 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse KILL instead of IMPLICIT_DEF in LowerSubregs pass.
Jakob Stoklund Olesen [Mon, 28 Sep 2009 20:32:46 +0000 (20:32 +0000)]
Use KILL instead of IMPLICIT_DEF in LowerSubregs pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83007 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce the TargetInstrInfo::KILL machine instruction and get rid of the
Jakob Stoklund Olesen [Mon, 28 Sep 2009 20:32:26 +0000 (20:32 +0000)]
Introduce the TargetInstrInfo::KILL machine instruction and get rid of the
unused DECLARE instruction.

KILL is not yet used anywhere, it will replace TargetInstrInfo::IMPLICIT_DEF
in the places where IMPLICIT_DEF is just used to alter liveness of physical
registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83006 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a testcase to help test analysis preservation.
Dan Gohman [Mon, 28 Sep 2009 18:40:27 +0000 (18:40 +0000)]
Add a testcase to help test analysis preservation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83002 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCreate a README.txt for lib/Analysis, and add an entry.
Dan Gohman [Mon, 28 Sep 2009 18:38:53 +0000 (18:38 +0000)]
Create a README.txt for lib/Analysis, and add an entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83001 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove dead code.
Devang Patel [Mon, 28 Sep 2009 18:31:56 +0000 (18:31 +0000)]
Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82999 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse VerifySchedule instead of doing the work manually.
Dan Gohman [Mon, 28 Sep 2009 16:09:41 +0000 (16:09 +0000)]
Use VerifySchedule instead of doing the work manually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82995 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix this debug output to handle the case where the loop has been deleted.
Dan Gohman [Mon, 28 Sep 2009 15:40:01 +0000 (15:40 +0000)]
Fix this debug output to handle the case where the loop has been deleted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82994 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInclude the name of the loop header in debug messages.
Dan Gohman [Mon, 28 Sep 2009 15:07:18 +0000 (15:07 +0000)]
Include the name of the loop header in debug messages.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82993 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove a redundant #ifndef and add an assertion string.
Dan Gohman [Mon, 28 Sep 2009 14:38:19 +0000 (14:38 +0000)]
Remove a redundant #ifndef and add an assertion string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82991 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert LoopSimplify and LoopExtractor from FunctionPass to LoopPass.
Dan Gohman [Mon, 28 Sep 2009 14:37:51 +0000 (14:37 +0000)]
Convert LoopSimplify and LoopExtractor from FunctionPass to LoopPass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82990 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPass the optimization level when constructing the ARM instruction selector.
Bob Wilson [Mon, 28 Sep 2009 14:30:20 +0000 (14:30 +0000)]
Pass the optimization level when constructing the ARM instruction selector.
Otherwise, it is always set to "default", which prevents debug info from
even being generated during isel.  Radar 7250345.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82988 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake ARM and Thumb2 32-bit immediate materialization into a single 32-bit pseudo
Evan Cheng [Mon, 28 Sep 2009 09:14:39 +0000 (09:14 +0000)]
Make ARM and Thumb2 32-bit immediate materialization into a single 32-bit pseudo
instruction. This makes it re-materializable.

Thumb2 will split it back out into two instructions so IT pass will generate the
right mask. Also, this expose opportunies to optimize the movw to a 16-bit move.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82982 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't traverse into .svn directories.
Daniel Dunbar [Mon, 28 Sep 2009 07:32:45 +0000 (07:32 +0000)]
Don't traverse into .svn directories.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82978 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix thinko in my recent movt commit: it's not safe to remat movt, since it has input...
Anton Korobeynikov [Mon, 28 Sep 2009 07:26:46 +0000 (07:26 +0000)]
Fix thinko in my recent movt commit: it's not safe to remat movt, since it has input reg argument.
Disable rematting of it for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82975 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe select instruction is not neccesarily in the same block as the
Chris Lattner [Mon, 28 Sep 2009 06:49:44 +0000 (06:49 +0000)]
The select instruction is not neccesarily in the same block as the
phi nodes.  Make sure to phi translate from the right block.

This fixes a llvm-building-llvm failure on GVN-PRE.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82970 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCoalescer should not delete extract_subreg, insert_subreg, and subreg_to_reg of
Evan Cheng [Mon, 28 Sep 2009 05:28:43 +0000 (05:28 +0000)]
Coalescer should not delete extract_subreg, insert_subreg, and subreg_to_reg of
physical registers. This is especially critical for the later two since they
start the live interval of a super-register. e.g.
%DO<def> = INSERT_SUBREG %D0<undef>, %S0<kill>, 1
If this instruction is eliminated, the register scavenger will not be happy as
D0 is not defined previously.
This fixes PR5055.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82968 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDocument a bug in the ocaml bindings has wrong linkage values.
Erick Tryzelaar [Mon, 28 Sep 2009 04:42:55 +0000 (04:42 +0000)]
Document a bug in the ocaml bindings has wrong linkage values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82966 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExpose the rest of the attribute settings.
Erick Tryzelaar [Mon, 28 Sep 2009 04:42:47 +0000 (04:42 +0000)]
Expose the rest of the attribute settings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82965 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a bug in ocaml bindings that has incorrect linkage options.
Erick Tryzelaar [Mon, 28 Sep 2009 04:42:36 +0000 (04:42 +0000)]
Fix a bug in ocaml bindings that has incorrect linkage options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82964 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegenerate.
Mikhail Glushenkov [Mon, 28 Sep 2009 01:28:26 +0000 (01:28 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82958 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a way to query the number of input files.
Mikhail Glushenkov [Mon, 28 Sep 2009 01:16:42 +0000 (01:16 +0000)]
Add a way to query the number of input files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82957 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDocument the 'not' combinator.
Mikhail Glushenkov [Mon, 28 Sep 2009 01:16:07 +0000 (01:16 +0000)]
Document the 'not' combinator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82956 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA bit prettier formatting.
Mikhail Glushenkov [Mon, 28 Sep 2009 01:15:44 +0000 (01:15 +0000)]
A bit prettier formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82955 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove temporary debugging hack.
Dan Gohman [Mon, 28 Sep 2009 00:44:15 +0000 (00:44 +0000)]
Remove temporary debugging hack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82953 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the dominator verification code out of special code embedded within
Dan Gohman [Mon, 28 Sep 2009 00:27:48 +0000 (00:27 +0000)]
Move the dominator verification code out of special code embedded within
the PassManager code into a regular verifyAnalysis method.

Also, reorganize loop verification. Make the LoopPass infrastructure
call verifyLoop as needed instead of having LoopInfo::verifyAnalysis
check every loop in the function after each looop pass. Add a new
command-line argument, -verify-loop-info, to enable the expensive
full checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82952 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove this assert to check the condition as soon as it is known.
Dan Gohman [Mon, 28 Sep 2009 00:10:28 +0000 (00:10 +0000)]
Move this assert to check the condition as soon as it is known.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82951 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtend the StartPassTimer and StopPassTimer functions so that the
Dan Gohman [Mon, 28 Sep 2009 00:07:05 +0000 (00:07 +0000)]
Extend the StartPassTimer and StopPassTimer functions so that the
code that stops the timer doesn't have to search to find the timer
object before it stops the timer. This avoids a lock acquisition
and a few other things done with the timer running.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82949 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse movt/movw pair to materialize 32 bit constants on ARMv6T2+.
Anton Korobeynikov [Sun, 27 Sep 2009 23:52:58 +0000 (23:52 +0000)]
Use movt/movw pair to materialize 32 bit constants on ARMv6T2+.
This should be better than single load from constpool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82948 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix an old copy+pasto.
Dan Gohman [Sun, 27 Sep 2009 23:52:07 +0000 (23:52 +0000)]
Fix an old copy+pasto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82947 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtract the code for inserting a loop into the loop queue into
Dan Gohman [Sun, 27 Sep 2009 23:49:43 +0000 (23:49 +0000)]
Extract the code for inserting a loop into the loop queue into
a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82946 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen a loop is deleted, immediately release all of the active
Dan Gohman [Sun, 27 Sep 2009 23:43:07 +0000 (23:43 +0000)]
When a loop is deleted, immediately release all of the active
LoopPasses for that loop. This avoids trouble with the PassManager
trying to call verifyAnalysis on them, and frees up some memory
sooner rather than later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82945 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtract the code for releasing a pass into a separate function, and
Dan Gohman [Sun, 27 Sep 2009 23:38:27 +0000 (23:38 +0000)]
Extract the code for releasing a pass into a separate function, and
tidy it up a little.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82944 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove the "metadata*" type and simplify the code it complicated. This was only
Nick Lewycky [Sun, 27 Sep 2009 23:27:42 +0000 (23:27 +0000)]
Remove the "metadata*" type and simplify the code it complicated. This was only
used to support GlobalVariables storing MDNodes, back when they were derived
from Constant before the introduction of NamedMDNode, but never removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82943 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLBRX no longer has an explicit SrcValueSDNode operand, so the type
Dan Gohman [Sun, 27 Sep 2009 23:17:47 +0000 (23:17 +0000)]
LBRX no longer has an explicit SrcValueSDNode operand, so the type
operand is now at index 2, rather than 3. This fixes the
"Invalid child # of SDNode!" failures on PowerPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82942 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosimplify some code.
Chris Lattner [Sun, 27 Sep 2009 21:46:50 +0000 (21:46 +0000)]
simplify some code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82936 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe bitcast case is not needed here: instcombine turns icmp(bitcast(x), null) ->...
Chris Lattner [Sun, 27 Sep 2009 21:42:46 +0000 (21:42 +0000)]
The bitcast case is not needed here: instcombine turns icmp(bitcast(x), null) -> icmp(x, null) already.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82935 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNew unit test for the cloning module, which so far only covers cloning of
Nick Lewycky [Sun, 27 Sep 2009 21:39:46 +0000 (21:39 +0000)]
New unit test for the cloning module, which so far only covers cloning of
instructions' optimization flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82934 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocalls are already unmovable, malloc doesn't need a special case.
Chris Lattner [Sun, 27 Sep 2009 21:36:19 +0000 (21:36 +0000)]
calls are already unmovable, malloc doesn't need a special case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82933 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocalls to external functions are already marked overdefined, special casing
Chris Lattner [Sun, 27 Sep 2009 21:35:11 +0000 (21:35 +0000)]
calls to external functions are already marked overdefined, special casing
malloc isn't needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82932 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocalls are already handled, malloc doesn't need a special case.
Chris Lattner [Sun, 27 Sep 2009 21:33:46 +0000 (21:33 +0000)]
calls are already handled, malloc doesn't need a special case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82931 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRound out the API for the new optimization flags.
Nick Lewycky [Sun, 27 Sep 2009 21:33:04 +0000 (21:33 +0000)]
Round out the API for the new optimization flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82930 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocalls are rejected above, no need to special case malloc here.
Chris Lattner [Sun, 27 Sep 2009 21:31:39 +0000 (21:31 +0000)]
calls are rejected above, no need to special case malloc here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82929 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove special handling of bitcast(malloc), it will be handled
Chris Lattner [Sun, 27 Sep 2009 21:29:28 +0000 (21:29 +0000)]
remove special handling of bitcast(malloc), it will be handled
when the loop inspects the bitcast operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82928 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agounlike the malloc instruction, "malloc" calls do not claim to be readonly, just nounwind.
Chris Lattner [Sun, 27 Sep 2009 21:23:38 +0000 (21:23 +0000)]
unlike the malloc instruction, "malloc" calls do not claim to be readonly, just nounwind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82927 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a new DirectiveMap stringmap, which allows more efficient dispatching
Chris Lattner [Sun, 27 Sep 2009 21:16:52 +0000 (21:16 +0000)]
add a new DirectiveMap stringmap, which allows more efficient dispatching
to directive handlers and allows for easier extensibility.

I only switched a few over for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82926 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLink order: it matters.
Nick Lewycky [Sun, 27 Sep 2009 20:58:01 +0000 (20:58 +0000)]
Link order: it matters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82925 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoallow pushing icmps through phis with multiple uses and across critical edges.
Chris Lattner [Sun, 27 Sep 2009 20:46:36 +0000 (20:46 +0000)]
allow pushing icmps through phis with multiple uses and across critical edges.
These are important to push up to encourage jump threading.  This shrinks 176.gcc a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82923 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnhance the previous fix for PR4895 to allow more values than just
Chris Lattner [Sun, 27 Sep 2009 20:18:49 +0000 (20:18 +0000)]
Enhance the previous fix for PR4895 to allow more values than just
simple constants for the true/false value of the select.  We now
do phi translation etc.  This really fixes PR4895 :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82917 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement PR4895, by making FoldOpIntoPhi handle select conditions
Chris Lattner [Sun, 27 Sep 2009 19:57:57 +0000 (19:57 +0000)]
implement PR4895, by making FoldOpIntoPhi handle select conditions
that are phi nodes.  Also tighten up FoldOpIntoPhi to treat constantexpr
operands to phis just like other variables, avoiding moving constantexpr
computations around.

Patch by Daniel Dunbar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82913 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoavoid copying MCAsmInfo by value, add an (extremely low prio) fixme.
Chris Lattner [Sun, 27 Sep 2009 19:38:39 +0000 (19:38 +0000)]
avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82911 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse explicit structs instead of std::pair to map callee saved regs to spill slots.
Tilmann Scheller [Sun, 27 Sep 2009 17:58:47 +0000 (17:58 +0000)]
Use explicit structs instead of std::pair to map callee saved regs to spill slots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82909 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete a bogus comment.
Dan Gohman [Sun, 27 Sep 2009 17:50:44 +0000 (17:50 +0000)]
Delete a bogus comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82908 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove a redundant assert.
Dan Gohman [Sun, 27 Sep 2009 17:48:37 +0000 (17:48 +0000)]
Remove a redundant assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82907 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnable -g with DEBUG_SYMBOLS and --enable-debug-symbols instead of
Jeffrey Yasskin [Sun, 27 Sep 2009 17:47:29 +0000 (17:47 +0000)]
Enable -g with DEBUG_SYMBOLS and --enable-debug-symbols instead of
DEBUG_RUNTIME.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82906 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix SCEVExpander's canonical addrec expansion code to work on loops that
Dan Gohman [Sun, 27 Sep 2009 17:46:40 +0000 (17:46 +0000)]
Fix SCEVExpander's canonical addrec expansion code to work on loops that
aren't in canonical loop-simplify form, since it doesn't itself depend
on LoopSimplify. This means handling loops without preheaders and loops
with multiple backedges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82905 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd dominates and releaseMemory member functions to PostDominatorTree.
Dan Gohman [Sun, 27 Sep 2009 17:39:12 +0000 (17:39 +0000)]
Add dominates and releaseMemory member functions to PostDominatorTree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82904 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGrab an LLVM Context from an instruction that exists rather than one
Dan Gohman [Sun, 27 Sep 2009 16:10:30 +0000 (16:10 +0000)]
Grab an LLVM Context from an instruction that exists rather than one
that is deleted in some situations. This fixes a use-after-free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82903 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClarify a comment.
Dan Gohman [Sun, 27 Sep 2009 15:41:19 +0000 (15:41 +0000)]
Clarify a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82902 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTell ScalarEvolution to forget everything it knows about a loop before
Dan Gohman [Sun, 27 Sep 2009 15:37:03 +0000 (15:37 +0000)]
Tell ScalarEvolution to forget everything it knows about a loop before
rotating the loop, since loop rotation is a very significant change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82901 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMicro-optimize DerivedType::dropAllTypeUses.
Dan Gohman [Sun, 27 Sep 2009 15:32:21 +0000 (15:32 +0000)]
Micro-optimize DerivedType::dropAllTypeUses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82900 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInstead of testing whether an instruction dominates the loop preheader,
Dan Gohman [Sun, 27 Sep 2009 15:30:00 +0000 (15:30 +0000)]
Instead of testing whether an instruction dominates the loop preheader,
test whether it properly dominates the loop header. This is equivalent
when the loop has a preheader, and has the advantage of working when
the loop doesn't have a preheader. Since IVUsers doesn't Require
LoopSimplify, the loop isn't guaranteed to have a preheader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82899 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a properlyDominates member function to ScalarEvolution.
Dan Gohman [Sun, 27 Sep 2009 15:26:03 +0000 (15:26 +0000)]
Add a properlyDominates member function to ScalarEvolution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82898 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove a redundant #include.
Dan Gohman [Sun, 27 Sep 2009 15:21:52 +0000 (15:21 +0000)]
Remove a redundant #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82897 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
Torok Edwin [Sun, 27 Sep 2009 11:08:03 +0000 (11:08 +0000)]
Avoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
in RegisterStatistic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82896 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnable pre-regalloc load / store multiple pass for Thumb2.
Evan Cheng [Sun, 27 Sep 2009 09:46:04 +0000 (09:46 +0000)]
Enable pre-regalloc load / store multiple pass for Thumb2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82893 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename REG -> REGISTER to make it explicit in the doc. <tt>ify some stuff.
Chris Lattner [Sun, 27 Sep 2009 08:01:44 +0000 (08:01 +0000)]
rename REG -> REGISTER to make it explicit in the doc.  <tt>ify some stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82892 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement and document support for filecheck variables. This
Chris Lattner [Sun, 27 Sep 2009 07:56:52 +0000 (07:56 +0000)]
implement and document support for filecheck variables.  This
allows matching and remembering a string and then matching and
verifying that the string occurs later in the file.

Change X86/xor.ll to use this in some cases where the test was
checking for an arbitrary register allocation decision.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82891 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove dead code from this function and optimize. Update its corresponding
Nick Lewycky [Sun, 27 Sep 2009 07:55:32 +0000 (07:55 +0000)]
Remove dead code from this function and optimize. Update its corresponding
LangRef entry too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82890 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInstruction::clone does not need to take an LLVMContext&. Remove that and
Nick Lewycky [Sun, 27 Sep 2009 07:38:41 +0000 (07:38 +0000)]
Instruction::clone does not need to take an LLVMContext&. Remove that and
update all the callers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82889 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFilecheckify this one test.
Nick Lewycky [Sun, 27 Sep 2009 06:25:05 +0000 (06:25 +0000)]
Filecheckify this one test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82888 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLeave a pointer to the documentation so that people don't end up change one but
Nick Lewycky [Sun, 27 Sep 2009 04:57:35 +0000 (04:57 +0000)]
Leave a pointer to the documentation so that people don't end up change one but
not the other in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82887 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrect the version numbers to match those actually tested for by
Nick Lewycky [Sun, 27 Sep 2009 04:56:27 +0000 (04:56 +0000)]
Correct the version numbers to match those actually tested for by
autoconf/AutoRegen.sh.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82886 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the integer type out of 'derived' and into 'primitive'. This permits us
Nick Lewycky [Sun, 27 Sep 2009 00:45:11 +0000 (00:45 +0000)]
Move the integer type out of 'derived' and into 'primitive'. This permits us
to explain that derived types are all composed of other types, which primitive
types aren't. Without moving integer out of derived, this wouldn't be true.

Perform a few trivial cleanups; 'i1' went from a link to #t_primitive to
#t_integer (a holdover from when it was a bool type I suppose).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82884 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove support for "NoSub" from regex. It seems like a minor optimization
Chris Lattner [Sat, 26 Sep 2009 21:27:04 +0000 (21:27 +0000)]
remove support for "NoSub" from regex.  It seems like a minor optimization
and makes the API more annoying.  Add a Regex::getNumMatches() method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82877 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSpeed up clang-only link, by really linking only clang, and not the unittests
Torok Edwin [Sat, 26 Sep 2009 20:18:58 +0000 (20:18 +0000)]
Speed up clang-only link, by really linking only clang, and not the unittests
too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82873 91177308-0d34-0410-b5e6-96231b3b80d8