Commit Graph

10706 Commits

Author SHA1 Message Date
Chris Lattner f3ef2cada7 don't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.
llvm-svn: 91886
2009-12-22 04:47:41 +00:00
Chris Lattner 9b7d99eb76 The phi translated pointer can be computed when returning a partially cached result
instead of stored.  This reduces memdep memory usage, and also eliminates a bunch of
weakvh's.  This speeds up gvn on gcc.c-torture/20001226-1.c from 23.9s to 8.45s (2.8x)
on a different machine than earlier.

llvm-svn: 91885
2009-12-22 04:25:02 +00:00
Bill Wendling 919b7aab2e Add more plumbing. This time in the LowerArguments and "get" functions which
return partial registers. This affected the back-end lowering code some.

Also patch up some places I missed before in the "get" functions.

llvm-svn: 91880
2009-12-22 02:10:19 +00:00
Chris Lattner 3d1205b3a8 fix unit test that I broke.
llvm-svn: 91877
2009-12-22 01:38:23 +00:00
Chris Lattner 18d8b7575e types don't need atomic inc/dec, they are local to an llvmcontext.
llvm-svn: 91873
2009-12-22 01:17:43 +00:00
Chris Lattner 84463813a1 comment fix: weakvh -> tracking vh
llvm-svn: 91867
2009-12-22 00:51:57 +00:00
Lang Hames 4c052261de Changed slot index ranges for MachineBasicBlocks to be exclusive of endpoint.
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals.

llvm-svn: 91859
2009-12-22 00:11:50 +00:00
Bill Wendling 28727f3785 - Add a bit more plumbing assigning an order to SDNodes.
- Modify the "dump" method to emit the order of an SDNode.

llvm-svn: 91845
2009-12-21 21:59:52 +00:00
Anton Korobeynikov 131420c5d7 Remove uber-gross hack. The define _snprintf to snprintf is invalid due to two reasons: 1. Accroding to C++ standard snprintf should be available in std namespace (and __gnu_cxx in case of GCC to). Such ifdef will change all snprintf's to _snprintf's, but won't bring snprintf to all necessary namespaces. Thus e.g. any locale-using code on mingw will yield an error (include this file + string to see the result) 2. MSVCRT's _snprintf does not comply with C99 standard. Standard one is snprintf.
llvm-svn: 91842
2009-12-21 20:19:37 +00:00
Bill Wendling 6de55a0efd Place SDNodeOrdering.h in the directory it's used.
llvm-svn: 91834
2009-12-21 19:34:59 +00:00
Eric Christopher a91c0f48e6 Fix setting and default setting of code model for jit. Do this
by allowing backends to override routines that will default
the JIT and Static code generation to an appropriate code model
for the architecture.

Should fix PR 5773.

llvm-svn: 91824
2009-12-21 08:15:29 +00:00
Chris Lattner a0a51c7b0e improve compatibility with SWIG, patch by James Knight!
llvm-svn: 91822
2009-12-21 07:52:40 +00:00
Chris Lattner 080f666e01 add a helper ctor.
llvm-svn: 91819
2009-12-21 07:15:15 +00:00
Eli Friedman 00879d8faa Change StringRef::startswith and StringRef::endswith to versions which are a
bit more verbose, but optimize to much shorter code.

llvm-svn: 91817
2009-12-21 06:49:24 +00:00
Lang Hames 0209f50c0d Fixed use of phi param in SlotIndex constructors.
llvm-svn: 91790
2009-12-19 23:32:32 +00:00
Douglas Gregor 740ab38bb7 Fix a bunch of little errors that Clang complains about when its being pedantic
llvm-svn: 91764
2009-12-19 07:05:23 +00:00
Douglas Gregor 0a66daf900 Remove spurious semicolon. Thanks, Clang
llvm-svn: 91752
2009-12-19 03:21:36 +00:00
Dan Gohman a73df58110 Delete unused code.
llvm-svn: 91743
2009-12-19 01:47:13 +00:00
Chris Lattner dd3e9aaad3 Make some methods const. The only interesting change here is that
it changes raw_fd_ostream::preferred_buffer_size to return zero on
a scary stat failure instead of setting the stream to an error state.
This method really should not mutate the stream.

llvm-svn: 91740
2009-12-19 01:38:42 +00:00
Bill Wendling 57f2a6187a Forgot forward declaration.
llvm-svn: 91732
2009-12-19 00:05:07 +00:00
Dan Gohman f902c8c1b5 Eliminate unnecessary LLVMContexts.
llvm-svn: 91729
2009-12-18 23:42:08 +00:00
Bill Wendling 022d18fa3f Changes from review:
- Move DisableScheduling flag into TargetOption.h
- Move SDNodeOrdering into its own header file. Give it a minimal interface that
  doesn't conflate construction with storage.
- Move assigning the ordering into the SelectionDAGBuilder.

This isn't used yet, so there should be no functional changes.

llvm-svn: 91727
2009-12-18 23:32:53 +00:00
Victor Hernandez 0471abd58b Formalize MDNode's function-localness:
- an MDNode is designated as function-local when created, and continues to be even if its operands are modified not to refer to function-local IR
- function-localness is designated via lowest bit in SubclassData
- getLocalFunction() descends MDNode tree to see if it is consistently function-local

Add verification of MDNodes to checks that MDNodes are consistently function-local.
Update AsmWriter to use isFunctionLocal().

llvm-svn: 91708
2009-12-18 20:09:14 +00:00
Dan Gohman 4e3b29e309 Add utility routines for NSW multiply.
llvm-svn: 91664
2009-12-18 03:10:26 +00:00
Dan Gohman 4ab4420d7a Add utility routines for creating integer negation operators with NSW set.
Integer negation only overflows with INT_MIN, but that's an important case.

llvm-svn: 91662
2009-12-18 02:58:50 +00:00
Dan Gohman b256ccfbe5 Preserve NSW information in more places.
llvm-svn: 91656
2009-12-18 02:09:29 +00:00
Dan Gohman 18fa5686f6 Add Loop contains utility methods for testing whether a loop
contains another loop, or an instruction. The loop form is
substantially more efficient on large loops than the typical
code it replaces.

llvm-svn: 91654
2009-12-18 01:24:09 +00:00
Dan Gohman 92c3696524 Reapply LoopStrengthReduce and IVUsers cleanups, excluding the part
of 91296 that caused trouble -- the Processed list needs to be
preserved for the livetime of the pass, as AddUsersIfInteresting
is called from other passes.

llvm-svn: 91641
2009-12-18 00:06:20 +00:00
John McCall 753100cef3 Sundry dependent-name fixes flagged by clang++.
llvm-svn: 91636
2009-12-17 23:49:16 +00:00
Chris Lattner cbc0804c71 tabs -> spaces.
llvm-svn: 91622
2009-12-17 21:23:46 +00:00
Jeffrey Yasskin 5908f1e27b Make Path use StringRef instead of std::string where possible.
llvm-svn: 91620
2009-12-17 21:02:39 +00:00
Steve Naroff d3ab107432 Fix Windows build breakage...
llvm-svn: 91617
2009-12-17 20:39:34 +00:00
Ken Dyck df5561db78 Introduce EVT::getHalfSizedIntegerVT() for use in ExpandUnalignedStore() in
LegalizeDAG.cpp. Unlike the code it replaces, which simply decrements the simple
type by one, getHalfSizedIntegerVT() searches for the smallest simple integer
type that is at least half the size of the type it is called on. This approach
has the advantage that it will continue working if a new value type (such as
i24) is added to MVT.

Also, in preparation for new value types, remove the assertions that
non-power-of-2 8-bit-mutiple types are Extended when legalizing extload and
truncstore operations.

llvm-svn: 91614
2009-12-17 20:09:43 +00:00
Jeffrey Yasskin 28f244863e This fixes a memory leak in OpaqueType found by Google's internal heapchecker.
llvm-svn: 91611
2009-12-17 19:55:06 +00:00
Eric Christopher 2d1ffe028f Fix unused variable warning.
llvm-svn: 91609
2009-12-17 19:07:19 +00:00
Evan Cheng 090ac0865a Revert 91280-91283, 91286-91289, 91291, 91293, 91295-91296. It apparently introduced a non-deterministic behavior in the optimizer somewhere.
llvm-svn: 91598
2009-12-17 09:39:49 +00:00
Mikhail Glushenkov 1fe2678a06 Add a 'set_option' action for use in OptionPreprocessor.
llvm-svn: 91594
2009-12-17 07:49:16 +00:00
Bob Wilson ff43ab88ff BIT_CONVERT nodes are used for vector types, too.
llvm-svn: 91582
2009-12-17 05:05:36 +00:00
Daniel Dunbar b827e52638 Reapply r91392, it was only unmasking the bug, and since TOT is still broken having it reverted does no good.
llvm-svn: 91560
2009-12-16 20:10:05 +00:00
Jim Grosbach 2a282f2f86 Add @earlyclobber TableGen constraint
llvm-svn: 91554
2009-12-16 19:43:02 +00:00
Daniel Dunbar 1482b5aa16 Fix one more missing this-> to placate that picky clang++.
llvm-svn: 91536
2009-12-16 11:38:03 +00:00
Daniel Dunbar df45b70c1e Revert "Initial work on disabling the scheduler. This is a work in progress, and
this", this broke llvm-gcc bootstrap for release builds on
x86_64-apple-darwin10.

llvm-svn: 91533
2009-12-16 10:56:02 +00:00
Chris Lattner 9527af246e fix more missing this->'s to placate clang++
llvm-svn: 91531
2009-12-16 09:17:12 +00:00
Chris Lattner 5f5fffc5b2 Fix a missing this-> that clang++ notices.
llvm-svn: 91530
2009-12-16 09:09:54 +00:00
Chris Lattner 4ea86c460a now that libsystem no longer uses SmallVector, we can move
SmallVectorBase::grow_pod out of line, finally satisfying PR3758.

llvm-svn: 91529
2009-12-16 08:44:24 +00:00
Chris Lattner 5c0917c175 factor out the grow() method for all pod implementations into one
common function.  It is still an inline method, which will be fixed next.

llvm-svn: 91526
2009-12-16 08:34:40 +00:00
Victor Hernandez 2003b90807 Use different name for argument and field
llvm-svn: 91524
2009-12-16 08:10:57 +00:00
Chris Lattner f684b9039d pull destroy_range and uninitialized_copy up to the
SmallVectorTemplateBase class, which allows us to statically
dispatch on isPodLike instead of dynamically.

llvm-svn: 91523
2009-12-16 08:09:23 +00:00
Chris Lattner acc0e62625 sink most of the meat in smallvector back from SmallVectorTemplateCommon
down into SmallVectorImpl.  This requires sprinking a ton of this->'s in,
but gives us a place to factor.

llvm-svn: 91522
2009-12-16 08:05:48 +00:00
Chris Lattner 8b8d01829e substantial refactoring of SmallVector, now most code is in SmallVectorTemplateCommon,
and there is a new SmallVectorTemplateBase class in between it and SmallVectorImpl.
SmallVectorTemplateBase can be specialized based on isPodLike.

llvm-svn: 91518
2009-12-16 06:55:45 +00:00