oota-llvm.git
15 years agoremove trailing whitespace
Jim Grosbach [Fri, 17 Apr 2009 23:30:55 +0000 (23:30 +0000)]
remove trailing whitespace

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

15 years agoRecommit r69335 and r69336. These were not causing problems.
Bill Wendling [Fri, 17 Apr 2009 22:40:38 +0000 (22:40 +0000)]
Recommit r69335 and r69336. These were not causing problems.

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

15 years agoMove the AddLiveIn function definition closer to its uses.
Bob Wilson [Fri, 17 Apr 2009 20:42:34 +0000 (20:42 +0000)]
Move the AddLiveIn function definition closer to its uses.

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

15 years agoRearrange code to reduce indentation.
Bob Wilson [Fri, 17 Apr 2009 20:40:45 +0000 (20:40 +0000)]
Rearrange code to reduce indentation.

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

15 years agoRename file to have the correct suffix.
Bob Wilson [Fri, 17 Apr 2009 20:40:20 +0000 (20:40 +0000)]
Rename file to have the correct suffix.

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

15 years agoClean up formatting, remove trailing whitespace, fix comment typos and
Bob Wilson [Fri, 17 Apr 2009 20:35:10 +0000 (20:35 +0000)]
Clean up formatting, remove trailing whitespace, fix comment typos and
punctuation.  No functional changes.

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

15 years agoDelete an unused field.
Dan Gohman [Fri, 17 Apr 2009 20:03:31 +0000 (20:03 +0000)]
Delete an unused field.

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

15 years agoUse CallConvLower.h and TableGen descriptions of the calling conventions
Bob Wilson [Fri, 17 Apr 2009 19:07:39 +0000 (19:07 +0000)]
Use CallConvLower.h and TableGen descriptions of the calling conventions
for ARM.  Patch by Sandeep Patel.

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

15 years agoUpdate information on canadian cross builds
Jim Grosbach [Fri, 17 Apr 2009 17:25:16 +0000 (17:25 +0000)]
Update information on canadian cross builds

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

15 years agoUse a safer iterator interface and get rid of std C++ library misuse.
David Greene [Fri, 17 Apr 2009 14:56:18 +0000 (14:56 +0000)]
Use a safer iterator interface and get rid of std C++ library misuse.
This fixes a --enable-expensive-checks problem.

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

15 years agoRegenerate configure.
David Greene [Fri, 17 Apr 2009 14:50:39 +0000 (14:50 +0000)]
Regenerate configure.

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

15 years agoAdd a --enable-profiling option to configure to build Debug+Profile and
David Greene [Fri, 17 Apr 2009 14:49:22 +0000 (14:49 +0000)]
Add a --enable-profiling option to configure to build Debug+Profile and
Opt+Profile tools.  Now we can profile any kind of flavor we build.

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

15 years agoFor general dynamic TLS access we must use
Rafael Espindola [Fri, 17 Apr 2009 14:35:58 +0000 (14:35 +0000)]
For general dynamic TLS access we must use

leaq foo@TLSGD(%rip), %rdi

as part of the instruction sequence. Using a register other than %rdi and then
copying it to %rdi is not valid.

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

15 years agoRevert r69335 and r69336. They were causing build failures.
Bill Wendling [Fri, 17 Apr 2009 04:19:22 +0000 (04:19 +0000)]
Revert r69335 and r69336. They were causing build failures.

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

15 years agoDon't create ConstantInts with pointer type. This fixes a
Dan Gohman [Fri, 17 Apr 2009 02:02:52 +0000 (02:02 +0000)]
Don't create ConstantInts with pointer type. This fixes a
regression in 403.gcc in PIC_CODEGEN=1 and DISABLE_LTO=1
mode.

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

15 years agoTeach spiller to unfold instructions which modref spill slot when a scratch
Evan Cheng [Fri, 17 Apr 2009 01:29:40 +0000 (01:29 +0000)]
Teach spiller to unfold instructions which modref spill slot when a scratch
register is available and when it's profitable.

e.g.
     xorq  %r12<kill>, %r13
     addq  %rax, -184(%rbp)
     addq  %r13, -184(%rbp)
==>
     xorq  %r12<kill>, %r13
     movq  -184(%rbp), %r12
     addq  %rax, %r12
     addq  %r13, %r12
     movq  %r12, -184(%rbp)

Two more instructions, but fewer memory accesses. It can also open up
opportunities for more optimizations.

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

15 years agoMOV8rr_NOREX is a "Move" instruction. This doesn't currently
Dan Gohman [Fri, 17 Apr 2009 00:45:17 +0000 (00:45 +0000)]
MOV8rr_NOREX is a "Move" instruction. This doesn't currently
matter, because this instruction isn't generated until after
things that care.

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

15 years agoDon't use MOV8rr_NOREX on x86-32. It doesn't actually hurt anything at
Dan Gohman [Fri, 17 Apr 2009 00:43:09 +0000 (00:43 +0000)]
Don't use MOV8rr_NOREX on x86-32. It doesn't actually hurt anything at
present, but it's inconsistent.

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

15 years agoFix some failures in targets on available_externally functions,
Chris Lattner [Fri, 17 Apr 2009 00:26:12 +0000 (00:26 +0000)]
Fix some failures in targets on available_externally functions,
this fixes a crash on CodeGen/Generic/externally_available.ll
on ppc hosts.  Thanks to Nicholas L for pointing this out.

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

15 years agoUse TargetData::getTypeSizeInBits instead of getPrimitiveSizeInBits()
Dan Gohman [Thu, 16 Apr 2009 22:35:57 +0000 (22:35 +0000)]
Use TargetData::getTypeSizeInBits instead of getPrimitiveSizeInBits()
to get the correct answer for pointer types.

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

15 years agoFix PR3994: LLVMMatchType arguments do not refer to absolute return value
Bob Wilson [Thu, 16 Apr 2009 21:51:05 +0000 (21:51 +0000)]
Fix PR3994: LLVMMatchType arguments do not refer to absolute return value
and argument positions but only to the overloaded intrinsic parameters.
Keep a separate list of these overloaded parameters in CodeGenTarget.cpp
so they can be resolved easily.  Remove assertions from IntrinsicEmitter.cpp:
they were harmless but confusing, and the assertions elsewhere in TableGen
will catch any incorrect values.

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

15 years agomake sure to unlock keymgr if the JIT is created and destroyed, all
Chris Lattner [Thu, 16 Apr 2009 21:47:59 +0000 (21:47 +0000)]
make sure to unlock keymgr if the JIT is created and destroyed, all
locks must be matched with unlocks.  Also, use calloc to allocate the
block so that it is properly zero'd.  Thanks to Nick Kledzik for
tracking this down.

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

15 years agoAdd a comment to describe LLVMMatchType.
Bob Wilson [Thu, 16 Apr 2009 21:46:42 +0000 (21:46 +0000)]
Add a comment to describe LLVMMatchType.

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

15 years agoFix for PR3944: make mem2reg O(N) instead of O(N^2) in the number of
Eli Friedman [Thu, 16 Apr 2009 21:40:28 +0000 (21:40 +0000)]
Fix for PR3944: make mem2reg O(N) instead of O(N^2) in the number of
incoming edges for a block with many predecessors.

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

15 years agoHandle a pointer type correctly in SCEVExpander::visitAddRecExpr.
Dan Gohman [Thu, 16 Apr 2009 21:34:54 +0000 (21:34 +0000)]
Handle a pointer type correctly in SCEVExpander::visitAddRecExpr.

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

15 years agoIn the list-burr's pseudo two-addr dependency heuristics, don't
Dan Gohman [Thu, 16 Apr 2009 20:59:02 +0000 (20:59 +0000)]
In the list-burr's pseudo two-addr dependency heuristics, don't
add dependencies on nodes with exactly one successor which is a
COPY_TO_REGCLASS node. In the case that the copy is coalesced
away, the dependence should be on the user of the copy, rather
than the copy itself.

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

15 years agoHandle SUBREG_TO_REG instructions with the same heuristics
Dan Gohman [Thu, 16 Apr 2009 20:57:10 +0000 (20:57 +0000)]
Handle SUBREG_TO_REG instructions with the same heuristics
as INSERT_SUBREG instructions in the list-burr scheduler.

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

15 years agoFix a bug with inttoptr/ptrtoint casts where the pointer has a different
Dan Gohman [Thu, 16 Apr 2009 19:25:55 +0000 (19:25 +0000)]
Fix a bug with inttoptr/ptrtoint casts where the pointer has a different
size from the integer, requiring zero extension or truncation. Don't
create ZExtInsts with pointer types. This fixes a regression in
consumer-jpeg.

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

15 years agoDo not treat beginning of inlined scope as beginning of normal function scope if...
Devang Patel [Thu, 16 Apr 2009 17:55:30 +0000 (17:55 +0000)]
Do not treat beginning of inlined scope as beginning of normal function scope if the location info is missing.

Insetad of doing ...
if (inlined_subroutine && known_location)
  DW_TAG_inline_subroutine
else
  DW_TAG_subprogram

do

if (inlined_subroutine) {
 if (known_location)
   DW_TAG_inline_subroutine
} else {
 DW_TAG_subprogram
}

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

15 years agoMinor code simplifications. Don't attempt LSR on theoretical
Dan Gohman [Thu, 16 Apr 2009 16:49:48 +0000 (16:49 +0000)]
Minor code simplifications. Don't attempt LSR on theoretical
targets with pointers larger than 64 bits, due to the code not
yet being APInt clean.

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

15 years agoLSR is no longer a GEP optimizer. It is now an IV expression
Dan Gohman [Thu, 16 Apr 2009 16:46:01 +0000 (16:46 +0000)]
LSR is no longer a GEP optimizer. It is now an IV expression
optimizer, which just happen to frequently involve optimizing GEPs.

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

15 years agoFix SCEVExpander::visitSMaxExpr and SCEVExpander::visitUMaxExpr to
Dan Gohman [Thu, 16 Apr 2009 16:15:25 +0000 (16:15 +0000)]
Fix SCEVExpander::visitSMaxExpr and SCEVExpander::visitUMaxExpr to
not create ICmpInsts with operands of different types. This fixes
a regression in Applications/d/make_dparser.

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

15 years agoTeach SCEVExpander::InsertCastOfTo to avoid creating inttoptr-of-ptrtoint
Dan Gohman [Thu, 16 Apr 2009 15:52:57 +0000 (15:52 +0000)]
Teach SCEVExpander::InsertCastOfTo to avoid creating inttoptr-of-ptrtoint
and ptrtoint-of-inttoptr expressions. This fixes a regression in 300.twolf.

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

15 years agoUse ConstantExpr::getIntToPtr instead of SCEVExpander::InsertCastOfTo,
Dan Gohman [Thu, 16 Apr 2009 15:48:38 +0000 (15:48 +0000)]
Use ConstantExpr::getIntToPtr instead of SCEVExpander::InsertCastOfTo,
since the operand is always a constant.

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

15 years agoUse a SCEV expression cast instead of immediately inserting a
Dan Gohman [Thu, 16 Apr 2009 15:47:35 +0000 (15:47 +0000)]
Use a SCEV expression cast instead of immediately inserting a
new instruction with SCEVExpander::InsertCastOfTo.

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

15 years agoRecord line number at the beginning of a func.start.
Devang Patel [Thu, 16 Apr 2009 15:07:09 +0000 (15:07 +0000)]
Record line number at the beginning of a func.start.

This line was accidently lost yesterday.

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

15 years agofix PR3995. A scale must be 1, 2, 4 or 8.
Rafael Espindola [Thu, 16 Apr 2009 12:34:53 +0000 (12:34 +0000)]
fix PR3995. A scale must be 1, 2, 4 or 8.

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

15 years agoprove diagnostic -> group mapping information.
Chris Lattner [Thu, 16 Apr 2009 05:52:18 +0000 (05:52 +0000)]
prove diagnostic -> group mapping information.

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

15 years agoExpand GEPs in ScalarEvolution expressions. SCEV expressions can now
Dan Gohman [Thu, 16 Apr 2009 03:18:22 +0000 (03:18 +0000)]
Expand GEPs in ScalarEvolution expressions. SCEV expressions can now
have pointer types, though in contrast to C pointer types, SCEV
addition is never implicitly scaled. This not only eliminates the
need for special code like IndVars' EliminatePointerRecurrence
and LSR's own GEP expansion code, it also does a better job because
it lets the normal optimizations handle pointer expressions just
like integer expressions.

Also, since LLVM IR GEPs can't directly index into multi-dimensional
VLAs, moving the GEP analysis out of client code and into the SCEV
framework makes it easier for clients to handle multi-dimensional
VLAs the same way as other arrays.

Some existing regression tests show improved optimization.
test/CodeGen/ARM/2007-03-13-InstrSched.ll in particular improved to
the point where if-conversion started kicking in; I turned it off
for this test to preserve the intent of the test.

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

15 years agoencode subgroups into the clang .inc file. -Wall now works!
Chris Lattner [Thu, 16 Apr 2009 03:16:12 +0000 (03:16 +0000)]
encode subgroups into the clang .inc file.  -Wall now works!

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

15 years agoIn -fast mode do what FastISel does.
Devang Patel [Thu, 16 Apr 2009 02:33:41 +0000 (02:33 +0000)]
In -fast mode do what FastISel does.
This code could use some refactoring help!

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

15 years agoIf FastISel is run and it has known DebugLoc then use it.
Devang Patel [Thu, 16 Apr 2009 01:33:10 +0000 (01:33 +0000)]
If FastISel is run and it has known DebugLoc then use it.

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

15 years agoIf location where the function was inlined is not know then do not emit debug info...
Devang Patel [Thu, 16 Apr 2009 01:31:54 +0000 (01:31 +0000)]
If location where the function was inlined is not know then do not emit debug info describing inlinied region.

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

15 years agostart producing subgroup info.
Chris Lattner [Thu, 16 Apr 2009 00:53:25 +0000 (00:53 +0000)]
start producing subgroup info.

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

15 years agoAnother testcase for IV shortening.
Dale Johannesen [Thu, 16 Apr 2009 00:45:21 +0000 (00:45 +0000)]
Another testcase for IV shortening.

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

15 years agoEliminate zext over (iv | const) or (signed iv),
Dale Johannesen [Wed, 15 Apr 2009 23:31:51 +0000 (23:31 +0000)]
Eliminate zext over (iv | const) or (signed iv),
and sext over (iv | const), if a longer iv is
available.  Allow expressions to have more than
one zext/sext parent.  All from OpenSSL.

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

15 years agomake sure that empty diag groups get known by clang.
Chris Lattner [Wed, 15 Apr 2009 22:33:02 +0000 (22:33 +0000)]
make sure that empty diag groups get known by clang.

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

15 years agoimplement support for writing out diagnostic group tables.
Chris Lattner [Wed, 15 Apr 2009 20:55:08 +0000 (20:55 +0000)]
implement support for writing out diagnostic group tables.

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

15 years agos/RootDbgScope/FunctionDbgScope/g
Devang Patel [Wed, 15 Apr 2009 20:41:31 +0000 (20:41 +0000)]
s/RootDbgScope/FunctionDbgScope/g

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

15 years agoEliminate zext over (iv & const) or ((iv+const)&const)
Dale Johannesen [Wed, 15 Apr 2009 20:41:02 +0000 (20:41 +0000)]
Eliminate zext over (iv & const) or ((iv+const)&const)
if a longer iv is available.  These subscript forms are
not common; they're a bottleneck in OpenSSL.

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

15 years agouse UppercaseString instead of EmitAllCaps
Chris Lattner [Wed, 15 Apr 2009 20:16:12 +0000 (20:16 +0000)]
use UppercaseString instead of EmitAllCaps

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

15 years agouse escape string.
Chris Lattner [Wed, 15 Apr 2009 20:13:18 +0000 (20:13 +0000)]
use escape string.

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

15 years agoteach EscapeString and UnescapeString to handle ".
Chris Lattner [Wed, 15 Apr 2009 20:12:52 +0000 (20:12 +0000)]
teach EscapeString and UnescapeString to handle ".

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

15 years agoAdd DISubprogram is not null check.
Devang Patel [Wed, 15 Apr 2009 20:11:08 +0000 (20:11 +0000)]
Add DISubprogram is not null check.
This fixes test/CodeGen//2009-01-21-invalid-debug-info.m test case.

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

15 years agoGeneralize one of the SelectionDAG::ReplaceAllUsesWith overloads
Dan Gohman [Wed, 15 Apr 2009 20:06:30 +0000 (20:06 +0000)]
Generalize one of the SelectionDAG::ReplaceAllUsesWith overloads
to support replacing a node with another that has a superset of
the result types. Use this instead of calling
ReplaceAllUsesOfValueWith for each value.

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

15 years agorename -gen-clang-diags-options -> -gen-clang-diag-groups
Chris Lattner [Wed, 15 Apr 2009 20:02:32 +0000 (20:02 +0000)]
rename -gen-clang-diags-options -> -gen-clang-diag-groups

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

15 years agomove clang-specific makefile goop to clang makefile.
Chris Lattner [Wed, 15 Apr 2009 19:57:42 +0000 (19:57 +0000)]
move clang-specific makefile goop to clang makefile.

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

15 years agoFix 80-column violations.
Dan Gohman [Wed, 15 Apr 2009 19:48:57 +0000 (19:48 +0000)]
Fix 80-column violations.

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

15 years agoAdd a folding table entry for MOV8rr_NOREX.
Dan Gohman [Wed, 15 Apr 2009 19:48:28 +0000 (19:48 +0000)]
Add a folding table entry for MOV8rr_NOREX.

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

15 years agoCheck isInlinedSubroutine() before creating DW_TAG_inlined_subroutine.
Devang Patel [Wed, 15 Apr 2009 19:42:57 +0000 (19:42 +0000)]
Check isInlinedSubroutine() before creating DW_TAG_inlined_subroutine.

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

15 years agoFix MachineInstr::getNumExplicitOperands to count
Dan Gohman [Wed, 15 Apr 2009 17:59:11 +0000 (17:59 +0000)]
Fix MachineInstr::getNumExplicitOperands to count
variadic operands correctly. Patch by Jakob Stoklund Olesen!

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

15 years agodon't infer diag class from parenting relations, make it an explicit field
Chris Lattner [Wed, 15 Apr 2009 16:55:46 +0000 (16:55 +0000)]
don't infer diag class from parenting relations, make it an explicit field
in the record.

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

15 years agoinclude the default mapping in the clang diagnostic .inc files.
Chris Lattner [Wed, 15 Apr 2009 16:43:18 +0000 (16:43 +0000)]
include the default mapping in the clang diagnostic .inc files.

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

15 years agominor cleanups
Chris Lattner [Wed, 15 Apr 2009 06:26:49 +0000 (06:26 +0000)]
minor cleanups

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

15 years agoLimit the number of times we're willing to chase pointers. Removes an O(n^2)
Nick Lewycky [Wed, 15 Apr 2009 06:23:41 +0000 (06:23 +0000)]
Limit the number of times we're willing to chase pointers. Removes an O(n^2)
problem from instcombine.

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

15 years agoAllow jumping to the end of a bitstream while reading
Douglas Gregor [Wed, 15 Apr 2009 04:53:47 +0000 (04:53 +0000)]
Allow jumping to the end of a bitstream while reading

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

15 years agoCheck for alignment.
Bill Wendling [Wed, 15 Apr 2009 04:51:05 +0000 (04:51 +0000)]
Check for alignment.

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

15 years agoMore obsessive reformatting. Fixed some validation errors.
Bill Wendling [Wed, 15 Apr 2009 02:12:37 +0000 (02:12 +0000)]
More obsessive reformatting. Fixed some validation errors.

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

15 years agoDon't use "protected:" in classes that aren't intended to be
Dan Gohman [Wed, 15 Apr 2009 01:47:03 +0000 (01:47 +0000)]
Don't use "protected:" in classes that aren't intended to be
subclassed.

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

15 years agoFix doxygen comment syntax.
Dan Gohman [Wed, 15 Apr 2009 01:44:07 +0000 (01:44 +0000)]
Fix doxygen comment syntax.

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

15 years agoFix X86MachineFunctionInfo's doxygen comment.
Dan Gohman [Wed, 15 Apr 2009 01:20:18 +0000 (01:20 +0000)]
Fix X86MachineFunctionInfo's doxygen comment.

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

15 years agoMove MachineRegisterInfo::setRegClass out of line.
Dan Gohman [Wed, 15 Apr 2009 01:19:35 +0000 (01:19 +0000)]
Move MachineRegisterInfo::setRegClass out of line.

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

15 years agoMove MachineJumpTableInfo::ReplaceMBBInJumpTables out of line.
Dan Gohman [Wed, 15 Apr 2009 01:18:49 +0000 (01:18 +0000)]
Move MachineJumpTableInfo::ReplaceMBBInJumpTables out of line.

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

15 years agoGive RemoveRegOperandFromRegInfo a comment and move the
Dan Gohman [Wed, 15 Apr 2009 01:17:37 +0000 (01:17 +0000)]
Give RemoveRegOperandFromRegInfo a comment and move the
code out of line.

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

15 years agoEnhance induction variable code to remove the
Dale Johannesen [Wed, 15 Apr 2009 01:10:12 +0000 (01:10 +0000)]
Enhance induction variable code to remove the
sext around sext(shorter IV + constant), using a
longer IV instead, when it can figure out the
add can't overflow.  This comes up a lot in
subscripting; mainly affects 64 bit.

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

15 years agoAvoid making the transformation enabled by my last patch if the new destinations...
Evan Cheng [Wed, 15 Apr 2009 00:43:54 +0000 (00:43 +0000)]
Avoid making the transformation enabled by my last patch if the new destinations have phi nodes.

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

15 years agoWhile inlining, clone llvm.dbg.func.start intrinsic and adjust
Devang Patel [Wed, 15 Apr 2009 00:17:06 +0000 (00:17 +0000)]
While inlining, clone llvm.dbg.func.start intrinsic and adjust
llvm.dbg.region.end instrinsic. This nested llvm.dbg.func.start/llvm.dbg.region.end pair now enables DW_TAG_inlined_subroutine support in code generator.

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

15 years agosilence a warning.
Chris Lattner [Wed, 15 Apr 2009 00:16:05 +0000 (00:16 +0000)]
silence a warning.

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

15 years agoConstruct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine scopes ...
Devang Patel [Wed, 15 Apr 2009 00:10:26 +0000 (00:10 +0000)]
Construct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine scopes (only in FastISel mode).

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

15 years agoDo for GR16_NOREX what r69049 did for GR8_NOREX, to avoid trouble with
Dan Gohman [Wed, 15 Apr 2009 00:10:16 +0000 (00:10 +0000)]
Do for GR16_NOREX what r69049 did for GR8_NOREX, to avoid trouble with
the local register allocator.

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

15 years agoAdd a method to check that the subprogram holds debug info for the given Function...
Devang Patel [Wed, 15 Apr 2009 00:06:07 +0000 (00:06 +0000)]
Add a method to check that the subprogram holds debug info for the given Function or not.

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

15 years agoAdd a new MOV8rr_NOREX, and make X86's copyRegToReg use it when
Dan Gohman [Wed, 15 Apr 2009 00:04:23 +0000 (00:04 +0000)]
Add a new MOV8rr_NOREX, and make X86's copyRegToReg use it when
either the source or destination is a physical h register.

This fixes sqlite3 with the post-RA scheduler enabled.

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

15 years agoTestcase for r69104.
Bill Wendling [Wed, 15 Apr 2009 00:04:11 +0000 (00:04 +0000)]
Testcase for r69104.

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

15 years agoGR8_NOREX can contain the H registers, since they don't require
Dan Gohman [Wed, 15 Apr 2009 00:00:48 +0000 (00:00 +0000)]
GR8_NOREX can contain the H registers, since they don't require
REX prefixes.

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

15 years agoOptimize conditional branch on i1 phis with non-constant inputs.
Evan Cheng [Tue, 14 Apr 2009 23:40:03 +0000 (23:40 +0000)]
Optimize conditional branch on i1 phis with non-constant inputs.

This turns:

eq:
        %3 = icmp eq i32 %1, %2
        br label %join

ne:
        %4 = icmp ne i32 %1, %2
        br label %join

join:
        %5 = phi i1 [%3, %eq], [%4, %ne]
        br i1 %5, label %yes, label %no

=>

eq:
        %3 = icmp eq i32 %1, %2
        br i1 %3, label %yes, label %no

ne:
        %4 = icmp ne i32 %1, %2
        br i1 %4, label %yes, label %no

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

15 years agoFix the RUN lines so that this test actually tests.
Dan Gohman [Tue, 14 Apr 2009 22:50:17 +0000 (22:50 +0000)]
Fix the RUN lines so that this test actually tests.

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

15 years agoFor the h-register addressing-mode trick, use the correct value for
Dan Gohman [Tue, 14 Apr 2009 22:45:05 +0000 (22:45 +0000)]
For the h-register addressing-mode trick, use the correct value for
any non-address uses of the address value. This fixes 186.crafty.

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

15 years agoMac OS X 10.6 and above do not use key manager to register EH frames.
Evan Cheng [Tue, 14 Apr 2009 22:31:59 +0000 (22:31 +0000)]
Mac OS X 10.6 and above do not use key manager to register EH frames.

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

15 years agoWhen the result of an EXTRACT_SUBREG, INSERT_SUBREG, or SUBREG_TO_REG
Dan Gohman [Tue, 14 Apr 2009 22:17:14 +0000 (22:17 +0000)]
When the result of an EXTRACT_SUBREG, INSERT_SUBREG, or SUBREG_TO_REG
operator is used by a CopyToReg to export the value to a different
block, don't reuse the CopyToReg's register for the subreg operation
result if the register isn't precisely the right class for the
subreg operation.

Also, rename the h-registers.ll test, now that there are more
than one.

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

15 years agoCall CreateProcess with bInheritHandles = TRUE.
Mikhail Glushenkov [Tue, 14 Apr 2009 21:31:36 +0000 (21:31 +0000)]
Call CreateProcess with bInheritHandles = TRUE.

Makes llvmc show error messages printed by child processes when run from the
Cygwin/MSYS shell. Since ExecuteAndWait does not return until the child program
has finished execution, this change should be harmless.

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

15 years agoDelete trailing whitespace.
Mikhail Glushenkov [Tue, 14 Apr 2009 21:31:14 +0000 (21:31 +0000)]
Delete trailing whitespace.

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

15 years agoSome of GR8_NOREX registers are only available in 64-bit mode.
Evan Cheng [Tue, 14 Apr 2009 16:57:43 +0000 (16:57 +0000)]
Some of GR8_NOREX registers are only available in 64-bit mode.

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

15 years agoHandle aggregate type arguments to direct and indirect calls.
Sanjiv Gupta [Tue, 14 Apr 2009 02:49:52 +0000 (02:49 +0000)]
Handle aggregate type arguments to direct and indirect calls.

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

15 years agoUse the output of the asm so the optimizer won't
Dale Johannesen [Tue, 14 Apr 2009 01:51:40 +0000 (01:51 +0000)]
Use the output of the asm so the optimizer won't
delete it.

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

15 years agoLoopIndexSplit needs to inform the loop pass manager of the instructions it is
Owen Anderson [Tue, 14 Apr 2009 01:04:19 +0000 (01:04 +0000)]
LoopIndexSplit needs to inform the loop pass manager of the instructions it is
deleting, not just the basic block.

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

15 years agoDo not force asm's to be chained if they don't touch
Dale Johannesen [Tue, 14 Apr 2009 00:56:56 +0000 (00:56 +0000)]
Do not force asm's to be chained if they don't touch
memory and aren't volatile.  This was interfering with
good scheduling.

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

15 years agoFix PR3934 part 2. findOnlyInterestingUse() was not setting IsCopy and IsDstPhys...
Evan Cheng [Tue, 14 Apr 2009 00:32:25 +0000 (00:32 +0000)]
Fix PR3934 part 2. findOnlyInterestingUse() was not setting IsCopy and IsDstPhys which are returned by value and used by callee. This happened to work on the earlier test cases because of a logic error in the caller side.

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

15 years agoMake these errors more noticable in build logs.
Daniel Dunbar [Mon, 13 Apr 2009 22:26:09 +0000 (22:26 +0000)]
Make these errors more noticable in build logs.

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

15 years agoChange SelectionDAG type legalization to allow BUILD_VECTOR operands to be
Bob Wilson [Mon, 13 Apr 2009 22:05:19 +0000 (22:05 +0000)]
Change SelectionDAG type legalization to allow BUILD_VECTOR operands to be
promoted to legal types without changing the type of the vector.  This is
following a suggestion from Duncan
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019923.html).
The transformation that used to be done during type legalization is now
postponed to DAG legalization.  This allows the BUILD_VECTORs to be optimized
and potentially handled specially by target-specific code.

It turns out that this is also consistent with an optimization done by the
DAG combiner: a BUILD_VECTOR and INSERT_VECTOR_ELT may be combined by
replacing one of the BUILD_VECTOR operands with the newly inserted element;
but INSERT_VECTOR_ELT allows its scalar operand to be larger than the
element type, with any extra high bits being implicitly truncated.  The
result is a BUILD_VECTOR where one of the operands has a type larger the
the vector element type.

Any code that operates on BUILD_VECTORs may now need to be aware of the
potential type discrepancy between the vector element type and the
BUILD_VECTOR operands.  This patch updates all of the places that I could
find to handle that case.

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

15 years agoRename COPY_TO_SUBCLASS to COPY_TO_REGCLASS, and generalize
Dan Gohman [Mon, 13 Apr 2009 21:06:25 +0000 (21:06 +0000)]
Rename COPY_TO_SUBCLASS to COPY_TO_REGCLASS, and generalize
it accordingly. Thanks to Jakob Stoklund Olesen for pointing
out how this might be useful.

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