1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

10690 Commits

Author SHA1 Message Date
Douglas Gregor
d8c669390b Remove spurious semicolon. Thanks, Clang
llvm-svn: 91752
2009-12-19 03:21:36 +00:00
Dan Gohman
b65e2548c8 Delete unused code.
llvm-svn: 91743
2009-12-19 01:47:13 +00:00
Chris Lattner
e390b70e2c 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
2a794804da Forgot forward declaration.
llvm-svn: 91732
2009-12-19 00:05:07 +00:00
Dan Gohman
4e04fb5ca8 Eliminate unnecessary LLVMContexts.
llvm-svn: 91729
2009-12-18 23:42:08 +00:00
Bill Wendling
aed33d79ab 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
44652ca549 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
3ceb7c0c47 Add utility routines for NSW multiply.
llvm-svn: 91664
2009-12-18 03:10:26 +00:00
Dan Gohman
6bb50740f4 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
91b1161840 Preserve NSW information in more places.
llvm-svn: 91656
2009-12-18 02:09:29 +00:00
Dan Gohman
0f8f7f179d 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
c483bed5e8 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
27b47abb40 Sundry dependent-name fixes flagged by clang++.
llvm-svn: 91636
2009-12-17 23:49:16 +00:00
Chris Lattner
2e0b4ea606 tabs -> spaces.
llvm-svn: 91622
2009-12-17 21:23:46 +00:00
Jeffrey Yasskin
d43aca2c4d Make Path use StringRef instead of std::string where possible.
llvm-svn: 91620
2009-12-17 21:02:39 +00:00
Steve Naroff
cbffdd23ee Fix Windows build breakage...
llvm-svn: 91617
2009-12-17 20:39:34 +00:00
Ken Dyck
8eb2574e35 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
9afe974318 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
9219efa49e Fix unused variable warning.
llvm-svn: 91609
2009-12-17 19:07:19 +00:00
Evan Cheng
18e334195d 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
40eeddfb23 Add a 'set_option' action for use in OptionPreprocessor.
llvm-svn: 91594
2009-12-17 07:49:16 +00:00
Bob Wilson
b27f554691 BIT_CONVERT nodes are used for vector types, too.
llvm-svn: 91582
2009-12-17 05:05:36 +00:00
Daniel Dunbar
70f0e3d7d0 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
483afaa7f7 Add @earlyclobber TableGen constraint
llvm-svn: 91554
2009-12-16 19:43:02 +00:00
Daniel Dunbar
9d1eac0cdd Fix one more missing this-> to placate that picky clang++.
llvm-svn: 91536
2009-12-16 11:38:03 +00:00
Daniel Dunbar
bcd7588947 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
4b21831c59 fix more missing this->'s to placate clang++
llvm-svn: 91531
2009-12-16 09:17:12 +00:00
Chris Lattner
ccad2e6bd4 Fix a missing this-> that clang++ notices.
llvm-svn: 91530
2009-12-16 09:09:54 +00:00
Chris Lattner
eee37b7ba5 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
7ea3176b0c 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
f6bcc2747e Use different name for argument and field
llvm-svn: 91524
2009-12-16 08:10:57 +00:00
Chris Lattner
bc295111a1 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
c9b5e915c2 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
19ee3f5216 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
Victor Hernandez
e91192950c MDNodes that refer to an instruction are local to a function; in that case, explicitly keep track of the function they are local to
llvm-svn: 91497
2009-12-16 02:52:09 +00:00
Jeffrey Yasskin
d50951dc1e Change indirect-globals to use a dedicated allocIndirectGV. This lets us
remove start/finishGVStub and the BufferState helper class from the
MachineCodeEmitter interface.  It has the side-effect of not setting the
indirect global writable and then executable on ARM, but that shouldn't be
necessary.

llvm-svn: 91464
2009-12-15 22:42:46 +00:00
Devang Patel
ffb33d1df8 Add support to emit debug info for C++ namespaces.
llvm-svn: 91440
2009-12-15 19:16:48 +00:00
Chris Lattner
b3db396df3 a few improvements:
1. Use std::equal instead of reinventing it.
2. don't run dtors in destroy_range if element is pod-like.
3. Use isPodLike to decide between memcpy/uninitialized_copy 
   instead of is_class.  isPodLike is more generous in some cases.

llvm-svn: 91427
2009-12-15 08:34:01 +00:00
Chris Lattner
f4e5966cf1 hoist the begin/end/capacity members and a few trivial methods
up into the non-templated SmallVectorBase class.

llvm-svn: 91426
2009-12-15 08:29:22 +00:00
Chris Lattner
f1a0d32b5f improve isPodLike to know that all non-class types are pod.
llvm-svn: 91425
2009-12-15 07:40:44 +00:00
Chris Lattner
521f59a9f5 Lang verified that SlotIndex is "pod like" even though it isn't a pod.
llvm-svn: 91423
2009-12-15 07:27:58 +00:00
Chris Lattner
587962c667 Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait.  This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.

llvm-svn: 91421
2009-12-15 07:26:43 +00:00
Chris Lattner
05651d4544 add an ALWAYS_INLINE macro, which does the obvious thing.
llvm-svn: 91416
2009-12-15 06:14:33 +00:00
John McCall
9ebba8d98e Names from dependent base classes are not found by unqualified lookup.
llvm-svn: 91407
2009-12-15 03:10:26 +00:00
Mikhail Glushenkov
93c8d86be9 Validate the generated C++ code in llvmc tests.
Checks that the code generated by 'tblgen --emit-llvmc' can be actually
compiled. Also fixes two bugs found in this way:

- forward_transformed_value didn't work with non-list arguments
- cl::ZeroOrOne is now called cl::Optional

llvm-svn: 91404
2009-12-15 03:04:52 +00:00
Bill Wendling
e972f48c8f Initial work on disabling the scheduler. This is a work in progress, and this
stuff isn't used just yet.

We want to model the GCC `-fno-schedule-insns' and `-fno-schedule-insns2'
flags. The hypothesis is that the people who use these flags know what they are
doing, and have hand-optimized the C code to reduce latencies and other
conflicts.

The idea behind our scheme to turn off scheduling is to create a map "on the
side" during DAG generation. It will order the nodes by how they appeared in the
code. This map is then used during scheduling to get the ordering.

llvm-svn: 91392
2009-12-15 01:54:51 +00:00
Bill Wendling
d2e25c606e Revert these. They may have been causing 483_xalancbmk to fail:
$ svn merge -c -91161 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91161 into '.':
U    lib/CodeGen/BranchFolding.cpp
U    lib/CodeGen/MachineBasicBlock.cpp
$ svn merge -c -91113 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91113 into '.':
G    lib/CodeGen/MachineBasicBlock.cpp
$ svn merge -c -91101 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91101 into '.':
U    include/llvm/CodeGen/MachineBasicBlock.h
G    lib/CodeGen/MachineBasicBlock.cpp
$ svn merge -c -91092 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91092 into '.':
G    include/llvm/CodeGen/MachineBasicBlock.h
G    lib/CodeGen/MachineBasicBlock.cpp

llvm-svn: 91376
2009-12-15 00:39:24 +00:00
Dan Gohman
44a8b5decd Move Flag and isVoid after the vector types, since bit arithmetic with
those enum values is less common.

llvm-svn: 91361
2009-12-14 23:36:03 +00:00
Dan Gohman
ec4e132814 Fix these asserts to check the invariant that the code actually
depends on.

llvm-svn: 91360
2009-12-14 23:34:36 +00:00
Dan Gohman
8fcc52aafd Update this comment.
llvm-svn: 91356
2009-12-14 23:13:31 +00:00