Commit Graph

45277 Commits

Author SHA1 Message Date
Gabor Greif d9065c4e29 update
llvm-svn: 66733
2009-03-11 22:52:25 +00:00
Rafael Espindola 294943c99b optimize i8 and i16 tls values.
llvm-svn: 66725
2009-03-11 22:40:04 +00:00
Owen Anderson aabe06d92a Reorganization: Move the Spiller out of VirtRegMap.cpp into its own files. No (intended) functionality change.
llvm-svn: 66720
2009-03-11 22:31:21 +00:00
Bill Wendling 42adc73a2b Add a -no-implicit-float flag. This acts like -soft-float, but may generate
floating point instructions that are explicitly specified by the user.

llvm-svn: 66719
2009-03-11 22:30:01 +00:00
Dale Johannesen 08ccba73a7 Skip interleaved debug info when fast-forwarding through
allocations.  Apparently the assumption is there is an
instruction (terminator?) following the allocation so I
am allowing the same assumption.

llvm-svn: 66716
2009-03-11 22:19:43 +00:00
Evan Cheng 6cba561648 My last coalescer fix introduced a subtler one. It's aborting a commuting optimization too late and left the live intervals to be out of sync with instructions. This fixes 8b10b.
llvm-svn: 66715
2009-03-11 22:18:44 +00:00
Dale Johannesen f61c8e81bd Debug intriniscs should be skipped when looking
for a dependency, not terminate the search.

llvm-svn: 66709
2009-03-11 21:13:01 +00:00
Anton Korobeynikov 7d4d379a00 Another bug :(
llvm-svn: 66708
2009-03-11 21:05:21 +00:00
Torok Edwin 5202cc0036 Make Print callable from a pass's print method: add const qualifier. No
functionality change.

llvm-svn: 66700
2009-03-11 20:50:17 +00:00
Anton Korobeynikov 38961d5bd6 I should definitely read make docs someday :(
llvm-svn: 66699
2009-03-11 20:40:15 +00:00
Gabor Greif 42225e50f3 do not pretend llvm/.../*.h being system headers
llvm-svn: 66697
2009-03-11 20:23:40 +00:00
Anton Korobeynikov 3b046d084e Unbreak the build. Dunno, why it did not fail on mingw :(
llvm-svn: 66692
2009-03-11 20:16:05 +00:00
Duncan Sands 4581bebf2a It makes no sense to have a ODR version of common
linkage, so remove it.

llvm-svn: 66690
2009-03-11 20:14:15 +00:00
Gabor Greif 605c7cab75 fix validator errors
llvm-svn: 66688
2009-03-11 20:04:08 +00:00
Gabor Greif bfdf23f07c Fix exaples using IRBuilder. Thanks, Quadrescence and Glip7 from IRC!
llvm-svn: 66687
2009-03-11 19:51:07 +00:00
Anton Korobeynikov a09ba46ee3 Disable plugins / shared stuff generation on windows targets.
This fixes fallout from recent PIC/delibtoolize changes and unbreaks
build on cygming.

llvm-svn: 66686
2009-03-11 19:49:42 +00:00
Mon P Wang 25c6a46a81 For yonah, fix a vector shuffle case for v16i8 where we didn't properly clear some bits.
llvm-svn: 66684
2009-03-11 18:47:57 +00:00
Chris Lattner be0d672ac4 implement support for C-style string literal concatenation in td files.
llvm-svn: 66663
2009-03-11 17:08:13 +00:00
Chris Lattner 93e87652f2 fix PR3785, a valgrind error on test/CodeGen/ARM/pr3502.ll
llvm-svn: 66660
2009-03-11 16:14:25 +00:00
Duncan Sands be69d60d54 Add parentheses to pacify gcc-4.3.
llvm-svn: 66653
2009-03-11 09:04:34 +00:00
Duncan Sands e2881053c9 Remove the one-definition-rule version of extern_weak
linkage: this linkage type only applies to declarations,
but ODR is only relevant to globals with definitions.

llvm-svn: 66650
2009-03-11 08:08:06 +00:00
Nate Begeman 664cf27602 Allow cross-process JIT to handle MachineRelocations of the ExternalSymbol
variety.  For example, an i64 div might turn into a call to __divdi3 during
legalization.

llvm-svn: 66646
2009-03-11 07:03:43 +00:00
Mon P Wang ce6a26cb1a Fixed a v8i16 shuffle case that should generate a pshufb instead of a pshuflw/hw.
llvm-svn: 66645
2009-03-11 06:35:11 +00:00
Chris Lattner 248ad00afd formatting change, reduce indentation. No functionality change.
llvm-svn: 66642
2009-03-11 05:48:52 +00:00
Chris Lattner 43d6377f89 reapply my previous patch (r66358) with a tweak to set the
alignment of the generated constant pool entry to the
desired alignment of a type.  If we don't do this, we end up
trying to do movsd from 4-byte alignment memory.  This fixes
450.soplex and 456.hmmer.

llvm-svn: 66641
2009-03-11 05:08:08 +00:00
Bill Wendling 1df2c1b583 Put the assignment back at the top of this method.
llvm-svn: 66611
2009-03-11 00:03:50 +00:00
Evan Cheng 64b3f9d7a7 Two coalescer fixes in one.
1. Use the same value# to represent unknown values being merged into sub-registers.
2. When coalescer commute an instruction and the destination is a physical register, update its sub-registers by merging in the extended ranges.

llvm-svn: 66610
2009-03-11 00:03:21 +00:00
Bill Wendling 9621b099af Make ivars private. Other cleanup. No functionality change.
llvm-svn: 66607
2009-03-10 23:57:09 +00:00
Mon P Wang 1073de0d73 Changed Allocate to use size_t instead of unsigned.
llvm-svn: 66602
2009-03-10 23:48:49 +00:00
Dan Gohman dab7b9355f Add an explicit keyword.
llvm-svn: 66595
2009-03-10 23:10:46 +00:00
Mon P Wang cc51b03a4e Fixed rounding up EltSize
llvm-svn: 66594
2009-03-10 23:04:40 +00:00
Gabor Greif 19393b0064 Give Op<N>() AppleScript-like semantics, i.e. for negative N it indexes relative to op_end.
This is a preliminary to changes to come. No intended functionality change.

llvm-svn: 66593
2009-03-10 23:02:13 +00:00
Bill Wendling 86c2656416 Just make the Dwarf timer group static inside of the getter function. No need to alloc/dealloc.
llvm-svn: 66591
2009-03-10 22:58:53 +00:00
Bill Wendling b74d650727 Don't put static functions in anonymous namespace.
llvm-svn: 66589
2009-03-10 22:36:31 +00:00
Dale Johannesen 900aaa3d1e Don't consider debug intrinsics when checking
whether a callee to be inlined is a leaf.

llvm-svn: 66588
2009-03-10 22:20:02 +00:00
Bill Wendling ff1faf7033 These should *stop* the timer, not start it again.
llvm-svn: 66586
2009-03-10 22:02:13 +00:00
Bill Wendling 6418590596 - Fix misspelled method name.
- Remove unused method.

llvm-svn: 66585
2009-03-10 21:59:25 +00:00
Bill Wendling a5c8e50ea6 - Create GetOrCreateSourceID from getOrCreateSourceID. GetOrCreateSourceID is
the untimed version of getOrCreateSourceID. getOrCreateSourceID calls
  GetOrCreateSourceID, of course.

- Move some methods into the "private" section. Constify at least one method.

- General clean-ups.

llvm-svn: 66582
2009-03-10 21:47:45 +00:00
Bill Wendling 63144deea9 Readd test, but XFAIL it.
llvm-svn: 66581
2009-03-10 21:31:00 +00:00
Bill Wendling 6e6d1b2481 Refine the Dwarf writer timers so that they measure exception writing and debug
writing individually.

llvm-svn: 66577
2009-03-10 21:23:25 +00:00
Dale Johannesen 703703aacb Removing a dead debug intrinsic shouldn't trigger
another instcombine pass if we weren't going to make
one without debug info.

llvm-svn: 66576
2009-03-10 21:19:49 +00:00
Evan Cheng aa887653f4 Revert 66358 for now. It's breaking povray, 450.soplex, and 456.hmmer on x86 / Darwin.
llvm-svn: 66574
2009-03-10 20:47:18 +00:00
Bill Wendling e8dd2847ff Add a timer to the DwarfWriter pass that measures the total time it takes to
emit exception and debug Dwarf info.

llvm-svn: 66571
2009-03-10 20:41:52 +00:00
Daniel Dunbar e2c9defed8 Add -disable-bindings for utils/NewNightlyTest.pl
llvm-svn: 66566
2009-03-10 19:33:13 +00:00
Dan Gohman 02ba62c106 Change these sed lines to behave correctly when the input string
contains commas. This fixes PR3727.

llvm-svn: 66565
2009-03-10 19:01:23 +00:00
Dan Gohman 79fc0e9250 Use WriteAsOperand instead of manually decorating the name for this
debug output. This improves the printing of anonymous values.

llvm-svn: 66561
2009-03-10 18:47:59 +00:00
Dan Gohman 64613aceed Fix a post-RA scheduling liveness bug. When a basic block is being
scheduled in multiple regions, liveness data used by the
anti-dependence breaker is carried from one region to the next, however
the information reflects the state of the instructions before scheduling.
After scheduling, there may be new live range overlaps. Handle this by
pessimizing the liveness data carried between regions to the point where
it will be conservatively correct now matter how the earlier region is
scheduled. This fixes a miscompilation in 176.gcc with the post-RA
scheduler enabled.

llvm-svn: 66558
2009-03-10 18:10:43 +00:00
Devang Patel 84fceff969 Ignore dbg info, while estimating size of jump through block.
llvm-svn: 66554
2009-03-10 18:00:05 +00:00
Rafael Espindola 59e371ac96 Fix rebuilding after a .td file is modified. This was broken since revision
65834.

llvm-svn: 66553
2009-03-10 17:58:54 +00:00
Chris Lattner 869b6bfd0b don't pass -Wl,-exported_symbol -Wl,_main to the linker when building on
Tiger.  PR3743

llvm-svn: 66550
2009-03-10 17:15:56 +00:00
Stuart Hastings 9a9a422886 Tweak the DejaGNU voodoo to match Bill's advice.
llvm-svn: 66547
2009-03-10 16:44:45 +00:00
Daniel Dunbar 3da6a7071a PR3478: raw_ostream should not buffer stderr
- Add unbuffered flag to raw_ostream, forwarded by raw_fd_ostream and
   used by raw_stderr_ostream.

llvm-svn: 66545
2009-03-10 16:21:55 +00:00
Daniel Dunbar 2cc05b76ad Add C++ marker.
llvm-svn: 66543
2009-03-10 15:56:48 +00:00
John Criswell 073e4d16c5 Do not attempt to do parial redundancy elimination on void values.
Also fixed a punctuation error in the header comment.
This fixes PR3775.

llvm-svn: 66542
2009-03-10 15:04:53 +00:00
Torok Edwin 51b4a28878 Global variables don't have a corresponding llvm.dbg.declare, yet it is possible
to obtain debug info about them.
Introduce helpers to access debug info for global variables. Also introduce a
helper that works for both local and global variables.

llvm-svn: 66541
2009-03-10 13:41:26 +00:00
Sanjiv Gupta afb355f281 Mark the Defs and Uses of STATUS register correctly, plus some reformatting.
llvm-svn: 66540
2009-03-10 10:35:34 +00:00
Evan Cheng 1c94228de3 If a function is marked alwaysinline, it must be inlined (possibly for correctness). Do so even if the callee has dynamic alloca and the caller doesn't.
llvm-svn: 66539
2009-03-10 07:57:50 +00:00
Bill Wendling a042a82408 Add radar number.
llvm-svn: 66534
2009-03-10 06:53:54 +00:00
Chris Lattner 1522e2498f wire up support for emitting "special" values from inline asm
format strings with the standard ${:foo} syntax.

llvm-svn: 66527
2009-03-10 05:37:13 +00:00
Dan Gohman b0d4009ec8 Add more information to the EFLAGS note.
llvm-svn: 66515
2009-03-10 00:26:23 +00:00
Stuart Hastings 9895a1c66a Check for warnings about inappropriate weak_imports.
Darwin-specific; marked XFAIL for others.

llvm-svn: 66514
2009-03-10 00:17:39 +00:00
Dan Gohman d5b35ee215 Add a note about EFLAGS optimization.
llvm-svn: 66508
2009-03-09 23:47:02 +00:00
Devang Patel 04852aa933 Ignore debug info while evaluating function.
llvm-svn: 66490
2009-03-09 23:04:12 +00:00
Dan Gohman f12436891e Don't record the increment instruction; just recompute it from the Phi
if needed. This simplifies the code a little, and is needed for an
upcoming refactoring.

llvm-svn: 66479
2009-03-09 22:04:01 +00:00
Chris Lattner 26161cdc6c Fix PR3724 by searching for the largest free block when
allocating memory in the JIT.  This is insanely inefficient, but
hey, most people implement their own memory managers anyway.

Patch by Eric Yew!

llvm-svn: 66472
2009-03-09 21:34:10 +00:00
Devang Patel 4a1b0776b3 Remove llvm.dbg.global_variables also.
llvm-svn: 66471
2009-03-09 21:32:28 +00:00
Dan Gohman b855164751 Fix a few more places where induction variable types were used
where memory access types are needed.

llvm-svn: 66470
2009-03-09 21:22:12 +00:00
Dan Gohman 5a4e31666d Use ReplacedTy instead of recomputing the same value.
llvm-svn: 66469
2009-03-09 21:19:58 +00:00
Dan Gohman 34e52ddb7d Use LoopInfo's getLoopLatch() instead of doing what it does manualy.
llvm-svn: 66467
2009-03-09 21:14:16 +00:00
Dan Gohman 70cc9875d8 Don't use an induction variable type as a memory access type.
Use VoidTy instead, to be properly conservative.

llvm-svn: 66463
2009-03-09 21:04:19 +00:00
Dan Gohman 917ffe4592 Factor out the code that determines the memory access type
of an instruction into a helper function.

llvm-svn: 66460
2009-03-09 21:01:17 +00:00
Chris Lattner dd282825a8 Clarify wording, patch by Stefanus Du Toit!
llvm-svn: 66458
2009-03-09 20:55:18 +00:00
Devang Patel 66f84e7a42 Add helper pass to remove llvm.dbg.declare intrinsics.
llvm-svn: 66454
2009-03-09 20:49:37 +00:00
Dan Gohman e201f8ff1d Move the sorting of the StrideOrder array earlier so that it doesn't
have to be done twice.

llvm-svn: 66449
2009-03-09 20:46:50 +00:00
Dan Gohman b5001909b0 Delete the isOnlyStride argument, which is unused.
llvm-svn: 66446
2009-03-09 20:41:15 +00:00
Dan Gohman 85875f7120 Tidy some LSR debug output: announce the loop it's about to process
before it does any processing.

llvm-svn: 66443
2009-03-09 20:34:59 +00:00
Evan Cheng 0ee0da841d ARM target now also recognize triplets like thumbv6-apple-darwin and set thumb mode and arch subversion. Eventually thumb triplets will go way and replaced with function notes.
llvm-svn: 66435
2009-03-09 20:25:39 +00:00
Chris Lattner 4249b9a698 Fix PR3763 by using proper APInt methods instead of uint64_t's.
llvm-svn: 66434
2009-03-09 20:22:18 +00:00
Gabor Greif c0bee2986c make the Op<N> methods protected, how it was intended to be
llvm-svn: 66430
2009-03-09 19:57:49 +00:00
Evan Cheng ce5dfb692a ARM isLegalAddressImmediate should check if type is a simple type now that optimizer can create values of funky scalar types.
llvm-svn: 66429
2009-03-09 19:15:00 +00:00
Evan Cheng fb8ded911e Yet another case where the spiller marked two uses of the same register on the same instruction as kill. This fixes PR3706.
llvm-svn: 66428
2009-03-09 19:00:05 +00:00
Evan Cheng 3807bb77fa Re-apply 66315, but restrict it to Darwin only.
llvm-svn: 66427
2009-03-09 18:28:37 +00:00
Bill Wendling c08580af44 Revert r66415. It's causing failures during bootstrap builds:
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__muldi3':
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:567: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__lshrdi3':
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:421: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
make[5]: *** [libgcc/./_lshrdi3.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [libgcc/./_muldi3.o] Error 1
make[5]: *** [libgcc/./_negdi2.o] Error 1


--- Reverse-merging (from foreign repository) r66415 into '.':
U    include/llvm/BasicBlock.h
U    include/llvm/ADT/ilist_node.h
U    include/llvm/CodeGen/SelectionDAG.h
U    include/llvm/CodeGen/MachineFunction.h
U    include/llvm/CodeGen/MachineBasicBlock.h
U    include/llvm/Function.h

llvm-svn: 66426
2009-03-09 18:01:33 +00:00
Bob Wilson 4718296d64 Add a constructor for BuildVectorSDNode and revert the temporary workaround
from 66280.  I was unable to verify this with gcc-3.4.6, but with gcc-3.3 it
avoids the "base class with only non-default constructor in class without
a constructor" warning.  Apparently that warning was promoted to an error
in gcc-3.4.

llvm-svn: 66424
2009-03-09 17:07:15 +00:00
Duncan Sands 5cbd3d9c52 This debug info special case should no longer
be needed now that these intrinsics are marked
as not accessing memory.

llvm-svn: 66420
2009-03-09 11:57:08 +00:00
Chris Lattner 126dab2f76 just remove the use_empty() check entirely, the only reason it
existed was for llvm-gcc 3.4 (which used the __main hack) which 
is really really long dead.

llvm-svn: 66417
2009-03-09 08:18:48 +00:00
Gabor Greif f183a3e95b in builds without asserts we do not need to allocate the Next pointer in "ghostly" sentinels
llvm-svn: 66415
2009-03-09 07:09:01 +00:00
Nick Lewycky 714976b70f Regenerate.
llvm-svn: 66407
2009-03-09 06:16:46 +00:00
Nick Lewycky b2f34f6211 Remove configurey-fu to autodetect hash_map and hash_set now that they are
no longer used in LLVM.

llvm-svn: 66406
2009-03-09 06:16:26 +00:00
Chris Lattner 317293b504 Make the code generator rip of dead constant expr uses before deciding
whether a global is dead or not.  This should fix PR3749 - linker adds 
spurious use to appending globals.  I can't reasonably add a testcase
for this, because the bc writer/reader strip dead constant users.

llvm-svn: 66404
2009-03-09 05:52:15 +00:00
Chris Lattner 6f884e07c5 make GlobalValue::removeDeadConstantUsers() const.
llvm-svn: 66403
2009-03-09 05:50:45 +00:00
Chris Lattner 822015d96e testcase for PR3744
llvm-svn: 66401
2009-03-09 05:44:59 +00:00
Chris Lattner 4ce03e66a1 don't allow hash_map or hash_set.
llvm-svn: 66400
2009-03-09 05:20:45 +00:00
Owen Anderson f9a9cf96a1 Ignore debug intrinsics when computing dependences.
llvm-svn: 66399
2009-03-09 05:12:38 +00:00
Chris Lattner 0eab5ecb71 reimplement AliasSetTracker in terms of DenseMap instead of hash_map,
hopefully no functionality change.

llvm-svn: 66398
2009-03-09 05:11:09 +00:00
Chris Lattner 7c2ab26007 add a #include to improve portability to windows, as requested by
someone on llvmdev.

llvm-svn: 66397
2009-03-09 05:10:08 +00:00
Bill Wendling c6869f4695 Pass in a std::string when getting the names of debugging things. This cuts down
on the number of times a std::string is created and copied.

llvm-svn: 66396
2009-03-09 05:04:40 +00:00
Chris Lattner 4a48815bd9 fix Analysis/BasicAA/2004-12-08-BasicAACrash.ll by allowing opaque types.
llvm-svn: 66395
2009-03-09 04:56:22 +00:00
Chris Lattner f880ca2a31 Fix two classes of bugs. First:
validate an invariant so that the asmparser rejects a bad construct
instead of the verifier.  Before:

llvm-as: assembly parsed, but does not verify as correct!
Invalid struct return type!
i64 (%struct.Type*, %struct.Type*)* @foo

after:

llvm-as: t.ll:5:8: functions with 'sret' argument must return void
define i64 @foo(%struct.Type* noalias nocapture sret %agg.result, %struct.Type* nocapture byval %t) nounwind {
       ^


Second, check that void is only used where allowed (in function return types) not in
arbitrary places, fixing PR3747 - Crash in llvm-as with void field in struct.  We
now reject that example with:

$ llvm-as t.ll
llvm-as: t.ll:1:12: struct element can not have void type
%x = type {void}
           ^

llvm-svn: 66394
2009-03-09 04:49:14 +00:00
Chris Lattner 6090a42fe5 Fix PR3746 - Crash in isel with GEP of function pointer
by checking that the top-level type of a gep is sized. This
causes us to reject the example with:

llvm-as: t2.ll:2:16: invalid getelementptr indices
getelementptr i32()* null, i32 1
              ^

llvm-svn: 66393
2009-03-09 04:46:40 +00:00