oota-llvm.git
14 years agoconstant propagate a method away.
Chris Lattner [Fri, 5 Feb 2010 19:20:30 +0000 (19:20 +0000)]
constant propagate a method away.

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

14 years agoUse a SmallSetVector instead of a SetVector; this code showed up as a
Dan Gohman [Fri, 5 Feb 2010 19:20:15 +0000 (19:20 +0000)]
Use a SmallSetVector instead of a SetVector; this code showed up as a
malloc caller in a profile.

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

14 years agochange getSizeOfImm and getBaseOpcodeFor to just take
Chris Lattner [Fri, 5 Feb 2010 19:16:26 +0000 (19:16 +0000)]
change getSizeOfImm and getBaseOpcodeFor to just take
TSFlags directly instead of a TargetInstrDesc.

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

14 years agoadd some more encodings.
Chris Lattner [Fri, 5 Feb 2010 19:04:37 +0000 (19:04 +0000)]
add some more encodings.

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

14 years agoRemove this code for now. I have a better idea and will rewrite with
Eric Christopher [Fri, 5 Feb 2010 19:04:06 +0000 (19:04 +0000)]
Remove this code for now. I have a better idea and will rewrite with
that in mind.

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

14 years agoMake lit's gtest support honor config.environment.
Jeffrey Yasskin [Fri, 5 Feb 2010 18:09:19 +0000 (18:09 +0000)]
Make lit's gtest support honor config.environment.

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

14 years agoVMOVRRD and VMOVDRR both have Inst{7-6} = 0b00.
Johnny Chen [Fri, 5 Feb 2010 18:04:58 +0000 (18:04 +0000)]
VMOVRRD and VMOVDRR both have Inst{7-6} = 0b00.

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

14 years agoMove --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.
Jeffrey Yasskin [Fri, 5 Feb 2010 16:19:36 +0000 (16:19 +0000)]
Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.
llc.cpp also defined these flags, meaning that when I linked all of LLVM's
libraries into a single shared library, llc crashed on startup with duplicate
flag definitions.  This patch passes them through the EngineBuilder into
JIT::selectTarget().

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

14 years agoMake test more fucused eliminating extraneous bits.
Bill Wendling [Fri, 5 Feb 2010 11:21:05 +0000 (11:21 +0000)]
Make test more fucused eliminating extraneous bits.

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

14 years agoMC: Change default comment column to 40 characters.
Daniel Dunbar [Fri, 5 Feb 2010 07:32:18 +0000 (07:32 +0000)]
MC: Change default comment column to 40 characters.

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

14 years agoFix test.
Evan Cheng [Fri, 5 Feb 2010 06:37:00 +0000 (06:37 +0000)]
Fix test.

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

14 years agoimplement the non-relocation forms of memory operands
Chris Lattner [Fri, 5 Feb 2010 06:16:07 +0000 (06:16 +0000)]
implement the non-relocation forms of memory operands

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

14 years agoHandle tail call with byval arguments.
Evan Cheng [Fri, 5 Feb 2010 02:21:12 +0000 (02:21 +0000)]
Handle tail call with byval arguments.

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

14 years agostart adding MRMDestMem, which requires memory form mod/rm encoding
Chris Lattner [Fri, 5 Feb 2010 02:18:40 +0000 (02:18 +0000)]
start adding MRMDestMem, which requires memory form mod/rm encoding
to start limping.

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

14 years agoAdd a few more encodings, we can now encode all of:
Chris Lattner [Fri, 5 Feb 2010 01:53:19 +0000 (01:53 +0000)]
Add a few more encodings, we can now encode all of:

pushl %ebp
movl %esp, %ebp
movl $42, %eax
popl %ebp
ret

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

14 years agoWhen the scheduler unfold a load folding instruction it move some of the predecessors...
Evan Cheng [Fri, 5 Feb 2010 01:27:11 +0000 (01:27 +0000)]
When the scheduler unfold a load folding instruction it move some of the predecessors to the unfolded load. It decides what gets moved to the load by checking whether the new load is using the predecessor as an operand. The check neglects the cases whether the predecessor is a flagged scheduling unit.
rdar://7604000

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

14 years agoAn empty global constant (one of size 0) may have a section immediately
Bill Wendling [Fri, 5 Feb 2010 00:17:02 +0000 (00:17 +0000)]
An empty global constant (one of size 0) may have a section immediately
following it. However, the EmitGlobalConstant method wasn't emitting a body for
the constant. The assembler doesn't like that. Before, we were generating this:

  .zerofill __DATA, __common, __cmd, 1, 3

This fix puts us back to that semantic.

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

14 years agoDo not reassociate expressions with i1 type. SimplifyCFG converts some
Bob Wilson [Thu, 4 Feb 2010 23:32:37 +0000 (23:32 +0000)]
Do not reassociate expressions with i1 type.  SimplifyCFG converts some
short-circuited conditions to AND/OR expressions, and those expressions
are often converted back to a short-circuited form in code gen.  The
original source order may have been optimized to take advantage of the
expected values, and if we reassociate them, we change the order and
subvert that optimization.  Radar 7497329.

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

14 years agoDisable external stubs for X86-32 and X86-64
Evan Phoenix [Thu, 4 Feb 2010 19:56:59 +0000 (19:56 +0000)]
Disable external stubs for X86-32 and X86-64

Instruction selection for X86 now can choose an instruction
sequence that will fit any address of any symbol, no matter
the pointer width. X86-64 uses a mov+call-via-reg sequence
for this.

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

14 years agoFix typo Duncan noticed.
Evan Cheng [Thu, 4 Feb 2010 19:07:06 +0000 (19:07 +0000)]
Fix typo Duncan noticed.

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

14 years agoIncrease inliner thresholds by 25.
Jakob Stoklund Olesen [Thu, 4 Feb 2010 18:48:20 +0000 (18:48 +0000)]
Increase inliner thresholds by 25.

This makes the inliner about as agressive as it was before my changes to the
inliner cost calculations. These levels give the same performance and slightly
smaller code than before.

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

14 years agoFix small bug in handling instructions with more than one implicitly defined operand.
Jakob Stoklund Olesen [Thu, 4 Feb 2010 18:46:28 +0000 (18:46 +0000)]
Fix small bug in handling instructions with more than one implicitly defined operand.

ProcessImplicitDefs would only mark one operand per instruction with <undef>.
This fixed PR6086.

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

14 years agoGet the LLVMC tests working with clang++ by removing the problematic CXXFLAG in lit.
Benjamin Kramer [Thu, 4 Feb 2010 18:40:11 +0000 (18:40 +0000)]
Get the LLVMC tests working with clang++ by removing the problematic CXXFLAG in lit.

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

14 years agoApply property changes from PR6228.
Benjamin Kramer [Thu, 4 Feb 2010 11:57:54 +0000 (11:57 +0000)]
Apply property changes from PR6228.

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

14 years agoNew flag for GenLibDeps, and llvm-config-perobjincl.
Torok Edwin [Thu, 4 Feb 2010 09:31:35 +0000 (09:31 +0000)]
New flag for GenLibDeps, and llvm-config-perobjincl.

This allows to show the explicit files that need to be built/linked to get an
LLVM component.

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

14 years agomove the PR6214 microoptzn to this file.
Chris Lattner [Thu, 4 Feb 2010 07:32:01 +0000 (07:32 +0000)]
move the PR6214 microoptzn to this file.

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

14 years agofix a broken archive that was breaking dejagnu only (not lit)
Chris Lattner [Thu, 4 Feb 2010 07:11:08 +0000 (07:11 +0000)]
fix a broken archive that was breaking dejagnu only (not lit)
after r95292

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

14 years agoRe-enable x86 tail call optimization.
Evan Cheng [Thu, 4 Feb 2010 06:47:24 +0000 (06:47 +0000)]
Re-enable x86 tail call optimization.

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

14 years agoTemporarily revert this since it appears to have caused a build
Eric Christopher [Thu, 4 Feb 2010 06:41:27 +0000 (06:41 +0000)]
Temporarily revert this since it appears to have caused a build
failure.

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

14 years agoadd support for the sparcv9-*-* target triple to turn on
Chris Lattner [Thu, 4 Feb 2010 06:34:01 +0000 (06:34 +0000)]
add support for the sparcv9-*-* target triple to turn on
64-bit sparc codegen.  Patch by Nathan Keynes!

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

14 years agoFrom PR6228:
Chris Lattner [Thu, 4 Feb 2010 06:19:43 +0000 (06:19 +0000)]
From PR6228:

"Attached patch removes the extra NUL bytes from the output and changes
test/Archive/MacOSX.toc from a binary to a text file (removes
svn:mime-type=application/octet-stream and adds svn:eol-style=native).  I can't
figure out how to get SVN to include the new contents of the file in the patch
so I'm attaching it separately."

Patch by James Abbatiello!

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

14 years agoRework constant expr and array handling for objectsize instcombining.
Eric Christopher [Thu, 4 Feb 2010 02:55:34 +0000 (02:55 +0000)]
Rework constant expr and array handling for objectsize instcombining.

Fix bugs where we would compute out of bounds as in bounds, and where
we couldn't know that the linker could override the size of an array.

Add a few new testcases, change existing testcase to use a private
global array instead of extern.

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

14 years agoIt's too risky to eliminate sext / zext of call results for tail call optimization...
Evan Cheng [Thu, 4 Feb 2010 02:45:02 +0000 (02:45 +0000)]
It's too risky to eliminate sext / zext of call results for tail call optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing).

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

14 years agoChange the argument to getIntegerSCEV to be an int64_t, rather
Dan Gohman [Thu, 4 Feb 2010 02:43:51 +0000 (02:43 +0000)]
Change the argument to getIntegerSCEV to be an int64_t, rather
than int. This will make it more convenient for LSR, which does
a lot of things with int64_t offsets.

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

14 years agoIndirect tail call has to go through a call preserved register since it's after calle...
Evan Cheng [Thu, 4 Feb 2010 02:40:39 +0000 (02:40 +0000)]
Indirect tail call has to go through a call preserved register since it's after callee register pops. X86 isel lowering is using EAX / R11 and it was somehow adding that to function live out. That prevented the real function return register from being added to the function live out list and bad things happen.
This fixes 483.xalancbmk (with tail call opt).

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

14 years agoFilled in a few new APIs for the enhanced
Sean Callanan [Thu, 4 Feb 2010 01:43:08 +0000 (01:43 +0000)]
Filled in a few new APIs for the enhanced
disassembly library that provide access to
instruction information, and fixed ambiguous
wording in the comments for the header.

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

14 years agoUse a tab instead of space after .type, for consistency.
Dan Gohman [Thu, 4 Feb 2010 01:42:13 +0000 (01:42 +0000)]
Use a tab instead of space after .type, for consistency.

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

14 years agoRewrite FP constant handling in DEBUG_VALUE yet
Dale Johannesen [Thu, 4 Feb 2010 01:33:43 +0000 (01:33 +0000)]
Rewrite FP constant handling in DEBUG_VALUE yet
again, so it more or less handles long double.
Restore \n removed in latest MC frenzy.

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

14 years agoFix (and test) function-local metadata that occurs before the instruction that it...
Victor Hernandez [Thu, 4 Feb 2010 01:13:08 +0000 (01:13 +0000)]
Fix (and test) function-local metadata that occurs before the instruction that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated

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

14 years agoIf we're dealing with a zero-length array, don't lower to any
Eric Christopher [Wed, 3 Feb 2010 23:56:07 +0000 (23:56 +0000)]
If we're dealing with a zero-length array, don't lower to any
particular size, we just don't know what the length is yet.

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

14 years agoThis test passes now on ppc darwin; if it doesn't pass
Dale Johannesen [Wed, 3 Feb 2010 22:33:17 +0000 (22:33 +0000)]
This test passes now on ppc darwin; if it doesn't pass
on some other ppc say something on the list.

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

14 years agoThis test passes now on ppc darwin, so reenable it.
Dale Johannesen [Wed, 3 Feb 2010 22:29:02 +0000 (22:29 +0000)]
This test passes now on ppc darwin, so reenable it.

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

14 years agoDebugging is now reenabled on PPC darwin, so reenable
Dale Johannesen [Wed, 3 Feb 2010 22:24:49 +0000 (22:24 +0000)]
Debugging is now reenabled on PPC darwin, so reenable
these tests (they pass).

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

14 years agoenhance new encoder to support prefixes + RawFrm
Chris Lattner [Wed, 3 Feb 2010 21:57:59 +0000 (21:57 +0000)]
enhance new encoder to support prefixes + RawFrm
instructions with no operands.  It can now handle

define void @test2() nounwind { ret void }

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

14 years agoset up some infrastructure, some minor cleanups.
Chris Lattner [Wed, 3 Feb 2010 21:43:43 +0000 (21:43 +0000)]
set up some infrastructure, some minor cleanups.

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

14 years agoSpeculatively disable x86 automatic tail call optimization while we track down a...
Evan Cheng [Wed, 3 Feb 2010 21:40:40 +0000 (21:40 +0000)]
Speculatively disable x86 automatic tail call optimization while we track down a self-hosting issue.

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

14 years agoMake test less fragile
Evan Cheng [Wed, 3 Feb 2010 21:39:04 +0000 (21:39 +0000)]
Make test less fragile

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

14 years agostub out a new X86 encoder, which can be tried with
Chris Lattner [Wed, 3 Feb 2010 21:24:49 +0000 (21:24 +0000)]
stub out a new X86 encoder, which can be tried with
-enable-new-x86-encoder until its stable.

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

14 years agorename createX86MCCodeEmitter to more accurately reflect what it creates.
Chris Lattner [Wed, 3 Feb 2010 21:14:33 +0000 (21:14 +0000)]
rename createX86MCCodeEmitter to more accurately reflect what it creates.

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

14 years agoAdded support for X86 instruction prefixes so llvm-mc can assemble them. The
Kevin Enderby [Wed, 3 Feb 2010 21:04:42 +0000 (21:04 +0000)]
Added support for X86 instruction prefixes so llvm-mc can assemble them.  The
Lock prefix, Repeat string operation prefixes and the Segment override prefixes.
Also added versions of the move string and store string instructions without the
repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of
move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is
happy building the disassembler files.

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

14 years agoEmit appropriate expression to find virtual base offset.
Devang Patel [Wed, 3 Feb 2010 20:08:48 +0000 (20:08 +0000)]
Emit appropriate expression to find virtual base offset.

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

14 years agoProvide interface to identifiy artificial methods.
Devang Patel [Wed, 3 Feb 2010 19:57:19 +0000 (19:57 +0000)]
Provide interface to identifiy artificial methods.

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

14 years agor94686 changed all ModuleProvider parameters to Modules, which made the
Jeffrey Yasskin [Wed, 3 Feb 2010 19:18:04 +0000 (19:18 +0000)]
r94686 changed all ModuleProvider parameters to Modules, which made the
1-argument ExecutionEngine::create(Module*) ambiguous with the signature that
used to be ExecutionEngine::create(ModuleProvider*, defaulted_params).  Fixed
by removing the 1-argument create().  Fixes PR6221.

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

14 years agoMake docs less specific about their versions, at Chris's suggestion.
Jeffrey Yasskin [Wed, 3 Feb 2010 18:49:55 +0000 (18:49 +0000)]
Make docs less specific about their versions, at Chris's suggestion.

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

14 years agoAdd llvm_supports_darwin_and_target to DejaGNU as well, I'd almost forgotten it
Daniel Dunbar [Wed, 3 Feb 2010 18:43:46 +0000 (18:43 +0000)]
Add llvm_supports_darwin_and_target to DejaGNU as well, I'd almost forgotten it
ever existed. :)

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

14 years agoMention the version in the documentation index and link to the 2.6 docs, which
Jeffrey Yasskin [Wed, 3 Feb 2010 18:23:23 +0000 (18:23 +0000)]
Mention the version in the documentation index and link to the 2.6 docs, which
is what most readers will actually be aiming for.

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

14 years agollvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
Daniel Dunbar [Wed, 3 Feb 2010 18:18:30 +0000 (18:18 +0000)]
llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
output.

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

14 years agoAdd "Author Date Id Revision" svn:keyword properties to these files, as
Dan Gohman [Wed, 3 Feb 2010 17:27:31 +0000 (17:27 +0000)]
Add "Author Date Id Revision" svn:keyword properties to these files, as
is done with the other html files in doc, to hopefully keep strings like
"Last modified" current.

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

14 years agoAdjust the heuristics used to decide when SROA is likely to be profitable.
Bob Wilson [Wed, 3 Feb 2010 17:23:56 +0000 (17:23 +0000)]
Adjust the heuristics used to decide when SROA is likely to be profitable.
The SRThreshold value makes perfect sense for checking if an entire aggregate
should be promoted to a scalar integer, but it is not so good for splitting
an aggregate into its separate elements.  A struct may contain a large embedded
array along with some scalar fields that would benefit from being split apart
by SROA.  Even if the total aggregate size is large, it may still be good to
perform SROA.  Thus, the most important piece of this patch is simply moving
the aggregate size comparison vs. SRThreshold so that it guards only the
aggregate promotion.

We have also been checking the number of elements to decide if an aggregate
should be split up.  The limit of "SRThreshold/4" seemed rather arbitrary,
and I don't think it's very useful to derive this limit from SRThreshold
anyway.  I've collected some data showing that the current default limit of
32 (since SRThreshold defaults to 128) is a reasonable cutoff for struct
types.  One thing suggested by the data is that distinguishing between structs
and arrays might be useful.  There are (obviously) a lot more large arrays
than large structs (as measured by the number of elements and not the total
size -- a large array inside a struct still counts as a single element given
the way we do SROA right now).  Out of 8377 arrays where we successfully
performed SROA while compiling a large set of benchmarks, only 16 of them had
more than 8 elements.  And, for those 16 arrays, it's not at all clear that
SROA was actually beneficial.  So, to offset the compile time cost of
investigating more large structs for SROA, the patch lowers the limit on array
elements to 8.

This fixes Apple Radar 7563690.

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

14 years agoRepository access test commit
Garrison Venn [Wed, 3 Feb 2010 12:00:02 +0000 (12:00 +0000)]
Repository access test commit

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

14 years agoRemove redundant declaration.
Zhongxing Xu [Wed, 3 Feb 2010 09:05:21 +0000 (09:05 +0000)]
Remove redundant declaration.

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

14 years agoAdd constructors.
Zhongxing Xu [Wed, 3 Feb 2010 09:04:11 +0000 (09:04 +0000)]
Add constructors.

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

14 years agoreapply r95206, this time actually delete the code I'm replacing in the third stub...
Chris Lattner [Wed, 3 Feb 2010 06:42:38 +0000 (06:42 +0000)]
reapply r95206, this time actually delete the code I'm replacing in the third stub case.

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

14 years agorevert r95206, it is apparently causing bootstrap failure on i386-darwin9
Chris Lattner [Wed, 3 Feb 2010 06:41:18 +0000 (06:41 +0000)]
revert r95206, it is apparently causing bootstrap failure on i386-darwin9

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

14 years agoprint instruction encodings with the existing comment facilities,
Chris Lattner [Wed, 3 Feb 2010 06:28:13 +0000 (06:28 +0000)]
print instruction encodings with the existing comment facilities,
so that llvm-mc -show-encoding prints like this:

hlt                                                 ## encoding: [0xf4]

instead of like this:

hlt
                     # encoding: [0xf4]

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

14 years agomake the x86 backend emit darwin stubs through mcstreamer
Chris Lattner [Wed, 3 Feb 2010 06:21:16 +0000 (06:21 +0000)]
make the x86 backend emit darwin stubs through mcstreamer
instead of textually.

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

14 years agomake MachineModuleInfoMachO hold non-const MCSymbol*'s instead
Chris Lattner [Wed, 3 Feb 2010 06:18:30 +0000 (06:18 +0000)]
make MachineModuleInfoMachO hold non-const MCSymbol*'s instead
of const ones.  non-const ones aren't very useful, because you can't
even, say, emit them.

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

14 years agochange addPassesToEmitFile to return true on failure instead of its input,
Chris Lattner [Wed, 3 Feb 2010 05:55:08 +0000 (05:55 +0000)]
change addPassesToEmitFile to return true on failure instead of its input,
add -filetype=null for performance testing and remove -filetype=dynlib,
which isn't planned to be implemented.

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

14 years agoRevert 94937 and move the noreturn check to codegen.
Evan Cheng [Wed, 3 Feb 2010 03:55:59 +0000 (03:55 +0000)]
Revert 94937 and move the noreturn check to codegen.

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

14 years agoFixed the disassembler so it accepts multiple
Sean Callanan [Wed, 3 Feb 2010 03:46:41 +0000 (03:46 +0000)]
Fixed the disassembler so it accepts multiple
instructions on a single line.  Also made it a
bit more forgiving when it reports errors.

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

14 years agoMake APInt::countLeadingZerosSlowCase() treat the contents of padding bits
John McCall [Wed, 3 Feb 2010 03:42:44 +0000 (03:42 +0000)]
Make APInt::countLeadingZerosSlowCase() treat the contents of padding bits
as undefined.  Fixes an assertion in APFloat::toString noticed by Dale.

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

14 years agoAllow all types of callee's to be tail called. But avoid automatic tailcall if the...
Evan Cheng [Wed, 3 Feb 2010 03:28:02 +0000 (03:28 +0000)]
Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc.

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

14 years agoReconfigure with autoconf-2.60, and fix autoconf.ac to work with that version.
Jeffrey Yasskin [Wed, 3 Feb 2010 02:11:49 +0000 (02:11 +0000)]
Reconfigure with autoconf-2.60, and fix autoconf.ac to work with that version.

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

14 years agodon't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,
Chris Lattner [Wed, 3 Feb 2010 01:49:49 +0000 (01:49 +0000)]
don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,
.o files don't like that.

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

14 years agoprivatize a bunch of methods and move \n printing into them.
Chris Lattner [Wed, 3 Feb 2010 01:46:05 +0000 (01:46 +0000)]
privatize a bunch of methods and move \n printing into them.

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

14 years agorename printMachineInstruction -> EmitInstruction
Chris Lattner [Wed, 3 Feb 2010 01:41:03 +0000 (01:41 +0000)]
rename printMachineInstruction -> EmitInstruction

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

14 years agoReapply 95050 with a tweak to check the register class.
Dale Johannesen [Wed, 3 Feb 2010 01:40:33 +0000 (01:40 +0000)]
Reapply 95050 with a tweak to check the register class.

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

14 years agoprint instructions through the mcstreamer.
Chris Lattner [Wed, 3 Feb 2010 01:16:28 +0000 (01:16 +0000)]
print instructions through the mcstreamer.

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

14 years agoemit instructions through the streamer.
Chris Lattner [Wed, 3 Feb 2010 01:15:03 +0000 (01:15 +0000)]
emit instructions through the streamer.

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

14 years agoFinally eliminate printMCInst and send instructions through
Chris Lattner [Wed, 3 Feb 2010 01:13:25 +0000 (01:13 +0000)]
Finally eliminate printMCInst and send instructions through
the streamer.  Demo:

$ cat t.ll
define i32 @test() nounwind {
  ret i32 42
}
$ llc t.ll -o -
...
_test:
movl $42, %eax
ret
$ llc t.ll -o t.o -filetype=obj
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_test:
00000000 movl $0x0000002a,%eax
00000005 ret

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

14 years agorejigger the world so that EmitInstruction prints the \n at
Chris Lattner [Wed, 3 Feb 2010 01:09:55 +0000 (01:09 +0000)]
rejigger the world so that EmitInstruction prints the \n at
the end of the instruction instead of expecting the caller to
do it.  This currently causes the asm-verbose instruction
comments to be on the next line.

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

14 years agosink handling of target-independent machine instrs (other
Chris Lattner [Wed, 3 Feb 2010 01:00:52 +0000 (01:00 +0000)]
sink handling of target-independent machine instrs (other
than DEBUG_VALUE :(  ) into the target indep AsmPrinter.cpp
file.   This allows elimination of the
NO_ASM_WRITER_BOILERPLATE hack among other things.

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

14 years agomake these less sensitive to asm verbose changes by disabling it for them.
Chris Lattner [Wed, 3 Feb 2010 00:48:53 +0000 (00:48 +0000)]
make these less sensitive to asm verbose changes by disabling it for them.

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

14 years agoPrint FPImm a less kludgy way; APFloat.toString seems
Dale Johannesen [Wed, 3 Feb 2010 00:36:40 +0000 (00:36 +0000)]
Print FPImm a less kludgy way; APFloat.toString seems
to have some problems anyway.

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

14 years agoFix some comment typos.
Bob Wilson [Wed, 3 Feb 2010 00:33:21 +0000 (00:33 +0000)]
Fix some comment typos.

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

14 years agopass an instprinter into the AsmPrinter if it is available.
Chris Lattner [Wed, 3 Feb 2010 00:29:55 +0000 (00:29 +0000)]
pass an instprinter into the AsmPrinter if it is available.

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

14 years agomake any use of the "O" stream in asmprinter print to
Chris Lattner [Wed, 3 Feb 2010 00:22:02 +0000 (00:22 +0000)]
make any use of the "O" stream in asmprinter print to
stderr if in filetype=obj mode.  This is a hack, and will
live until dwarf emission and other random stuff that is
not yet going through MCStreamer is upgraded.  It only
impacts filetype=obj mode.

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

14 years agoRecommit this, looks like it wasn't the cause.
Eric Christopher [Wed, 3 Feb 2010 00:21:58 +0000 (00:21 +0000)]
Recommit this, looks like it wasn't the cause.

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

14 years agoByVal frame object size should be that of the byval argument, not the size of the...
Evan Cheng [Tue, 2 Feb 2010 23:58:13 +0000 (23:58 +0000)]
ByVal frame object size should be that of the byval argument, not the size of the type which is just a pointer. This is not known to break stuff but is wrong nevertheless.

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

14 years agoHook up -filetype=obj through the MachO streamer. Here's a demo:
Chris Lattner [Tue, 2 Feb 2010 23:57:42 +0000 (23:57 +0000)]
Hook up -filetype=obj through the MachO streamer.  Here's a demo:

$ cat t.ll
@g = global i32 42
$ llc t.ll -o t.o -filetype=obj
$ nm t.o
00000000 D _g

There is still a ton of work left.  Instructions are not being encoded
yet apparently.

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

14 years agoAs of r79039, we still try to eliminate the frame pointer on leaf functions,
Jim Grosbach [Tue, 2 Feb 2010 23:56:14 +0000 (23:56 +0000)]
As of r79039, we still try to eliminate the frame pointer on leaf functions,
even when -disable-fp-elim is specified.

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

14 years agoRevert 95130.
Evan Cheng [Tue, 2 Feb 2010 23:55:14 +0000 (23:55 +0000)]
Revert 95130.

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

14 years agoAccept floating point immediates in DEBUG_VALUE.
Dale Johannesen [Tue, 2 Feb 2010 23:54:23 +0000 (23:54 +0000)]
Accept floating point immediates in DEBUG_VALUE.

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

14 years agoAsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we need
Daniel Dunbar [Tue, 2 Feb 2010 23:46:47 +0000 (23:46 +0000)]
AsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we need
some mechanism for specifying alternative syntaxes, but I'm not sure what form
that should take yet.

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

14 years agoAsmMatcherEmitter: Use stable_sort when reordering instructions, so that order
Daniel Dunbar [Tue, 2 Feb 2010 23:46:36 +0000 (23:46 +0000)]
AsmMatcherEmitter: Use stable_sort when reordering instructions, so that order
is still deterministic even amongst ambiguous instructions (eventually ambiguous
match orders will be a hard error, but we aren't there yet).

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

14 years agouse OwningPtr and factor code better.
Chris Lattner [Tue, 2 Feb 2010 23:45:17 +0000 (23:45 +0000)]
use OwningPtr and factor code better.

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

14 years agorefactor code so that LLVMTargetMachine creates the asmstreamer and
Chris Lattner [Tue, 2 Feb 2010 23:37:42 +0000 (23:37 +0000)]
refactor code so that LLVMTargetMachine creates the asmstreamer and
mccontext instead of having AsmPrinter do it.  This allows other
types of MCStreamer's to be passed in.

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

14 years agoHopefully temporarily revert this.
Eric Christopher [Tue, 2 Feb 2010 23:01:31 +0000 (23:01 +0000)]
Hopefully temporarily revert this.

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

14 years agosimplify getVerboseAsm
Chris Lattner [Tue, 2 Feb 2010 22:58:13 +0000 (22:58 +0000)]
simplify getVerboseAsm

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

14 years agomove handling of asm-verbose out of AsmPrinter.cpp into LLVMTargetMachine.cpp with...
Chris Lattner [Tue, 2 Feb 2010 22:54:51 +0000 (22:54 +0000)]
move handling of asm-verbose out of AsmPrinter.cpp into LLVMTargetMachine.cpp with the rest of the command line options.

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