Commit Graph

12655 Commits

Author SHA1 Message Date
Owen Anderson c6a36a23e8 Make module ownership methods on LLVMContext private, and make Module a friend
so that it can access them.  These are not intended to be externally accessible APIs.

llvm-svn: 113380
2010-09-08 18:22:11 +00:00
Owen Anderson 8e89e41faf Clarify the ownership model of LLVMContext and Module. Namely, contexts own
modules are instantiated in them.  If the context is deleted, all of its owned
modules are also deleted.

llvm-svn: 113374
2010-09-08 18:03:32 +00:00
Dan Gohman 64d842ec72 Add a new experimental generalized dependence query interface to
AliasAnalysis, and some code for implementing the new query on top of
existing implementations by making standard alias and getModRefInfo
queries.

llvm-svn: 113329
2010-09-08 01:32:20 +00:00
Bill Wendling 9040eecb49 Remove untrue comments.
llvm-svn: 113287
2010-09-07 21:07:59 +00:00
Owen Anderson 866e516ead Remove dead code. ManagedCleanup is unused, and contained a serious bug in that
the provided cleanup function is never actually called.

llvm-svn: 113284
2010-09-07 20:53:39 +00:00
Owen Anderson d12ea002b8 Fix PR7972, in which the PassRegistry was being leaked. As part of this,
switch to using a ManagedStatic for the global PassRegistry instead of a
ManagedCleanup, and fix a destruction ordering bug this exposed.

llvm-svn: 113283
2010-09-07 20:48:10 +00:00
Dan Gohman 9afd666faf Tidy up the getModRefInfo declarations.
llvm-svn: 113275
2010-09-07 20:37:47 +00:00
Owen Anderson 29ed9459d0 Properly initialize the pImpl member of PassRegistry to zero.
llvm-svn: 113264
2010-09-07 20:13:48 +00:00
Owen Anderson 3c8019c94d Add doxygen comments for PassRegistry.
llvm-svn: 113262
2010-09-07 20:04:26 +00:00
Bill Wendling 353802114f Add an MVT::x86mmx type. It will take the place of all current MMX vector types.
llvm-svn: 113261
2010-09-07 20:03:56 +00:00
Owen Anderson a74fa15f32 Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include clutter
and exposing internal details.

llvm-svn: 113252
2010-09-07 19:16:25 +00:00
Nick Lewycky 4c82c6c6fe Create PTX backend. Patch by Che-Liang Chiou!
llvm-svn: 113235
2010-09-07 18:14:24 +00:00
Dale Johannesen 605acfe533 Add patterns for MMX that use the new intrinsics.
Enable palignr intrinsic.
These may need adjustment for a new VT in due course.

llvm-svn: 113233
2010-09-07 18:10:56 +00:00
Nick Lewycky ad48e01eef Add completely hokey binary-and and binary-or operations to ConstantRange and
teach LazyValueInfo to use them.

llvm-svn: 113196
2010-09-07 05:39:02 +00:00
Nick Lewycky a35462da3d Add a new isSignWrappedSet() method to ConstantRange.
Fix zeroExtend and signExtend to support empty sets, and to return the smallest
possible result set which contains the extension of each element in their
inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10)
which contains 63446 members.

llvm-svn: 113187
2010-09-06 23:52:49 +00:00
Chris Lattner da24b9a49a pull a simple method out of LICM into a new
Loop::hasLoopInvariantOperands method. Remove
a useless and confusing Loop::isLoopInvariant(Instruction)
method, which didn't do what you thought it did.

No functionality change.

llvm-svn: 113133
2010-09-06 01:05:37 +00:00
Chris Lattner 15bd17e572 fix inconsistent formatting.
llvm-svn: 113121
2010-09-05 22:43:56 +00:00
Chris Lattner eeba0c73e5 implement rdar://6653118 - fastisel should fold loads where possible.
Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
for example, before, this code:

int foo(int x, int y, int z) {
  return x+y+z;
}

used to compile into:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	movl	4(%rsp), %esi
	addl	%edx, %esi
	movl	(%rsp), %edx
	addl	%esi, %edx
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Now we produce:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	addl	4(%rsp), %edx    ## Folded load
	addl	(%rsp), %edx     ## Folded load
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Fewer instructions and less register use = faster compiles.

llvm-svn: 113102
2010-09-05 02:18:34 +00:00
Jakob Stoklund Olesen 313358fef9 Remove dead code.
Clobber ranges are no longer used when joining physical registers.
Instead, all aliases are checked for interference.

llvm-svn: 113084
2010-09-04 21:09:33 +00:00
Chris Lattner f20ca8028d fix this to work with allocators that have reference type with compilers
that diagnose invalid references to references.

llvm-svn: 113078
2010-09-04 18:45:02 +00:00
Eric Christopher 0acd994f90 Reapply this increase to the number of virtual registers. All of the
various breakages appear to be dealt with.

Patch by Pekka Jääskeläinen.

llvm-svn: 113024
2010-09-03 22:46:31 +00:00
Jim Grosbach 0d5372679c Add 'const' to getter function.
llvm-svn: 112984
2010-09-03 18:17:16 +00:00
Owen Anderson 14431a1cb8 Re-enable CorrelatedValuePropagation. I've tested nightly tests, llvm-gcc
bootstrap, and clang self-host.

llvm-svn: 112948
2010-09-03 04:16:28 +00:00
Bob Wilson f65c9ef720 Replace NEON vabdl, vaba, and vabal intrinsics with combinations of the
vabd intrinsic and add and/or zext operations.  In the case of vaba, this
also avoids the need for a DAG combine pattern to combine vabd with add.
Update tests.  Auto-upgrade the old intrinsics.

llvm-svn: 112941
2010-09-03 01:35:08 +00:00
Chris Lattner ad074cb3f2 lets get crazy and name the header file the exact class name,
not a scrunched version of it.

llvm-svn: 112904
2010-09-02 23:09:42 +00:00
Chris Lattner 82570a04df AsmPrinter has a formatted stream, pass it down through AsmAnnotationWriter
llvm-svn: 112903
2010-09-02 23:07:12 +00:00
Bill Wendling ec24de769d Revert int_x86_mmx_palignr_b intrinsic to match llvm-gcc's version.
llvm-svn: 112886
2010-09-02 22:31:53 +00:00
Bill Wendling ec9b5fe131 - Change __builtin_ia32_palignr intrinsic type to match the pattern in clang.
- Add patterns to match the following MMX builtins:

   * __builtin_ia32_vec_init_v8qi
   * __builtin_ia32_vec_init_v4hi
   * __builtin_ia32_vec_init_v2si
   * __builtin_ia32_vec_ext_v2si

  These builtins do not correspond to a single MMX instruction. They will have
  to be lowered -- most likely in the back-end.

llvm-svn: 112881
2010-09-02 22:26:35 +00:00
Dan Gohman 3afbd60320 Remove obsolete comments about throwing exceptions.
llvm-svn: 112874
2010-09-02 22:14:51 +00:00
John McCall 7f55c258c6 After some discussion with djg, teach SmallVector to grow from a zero
capacity and remove the workaround in SmallVector<T,0>.  There are some
theoretical benefits to a N->2N+1 growth policy anyway.

llvm-svn: 112870
2010-09-02 21:55:03 +00:00
Benjamin Kramer e39017cb97 Add AsmParser support for the ELF .previous directive. Patch by Roman Divacky.
llvm-svn: 112849
2010-09-02 18:53:37 +00:00
Dan Gohman b8cfcb05d4 Add a comment.
llvm-svn: 112836
2010-09-02 17:35:10 +00:00
Devang Patel da3ef85460 Fix .debug_range for linux. Patch by Krister Wombell.
llvm-svn: 112830
2010-09-02 16:43:44 +00:00
Duncan Sands 6778149f7e Reapply commit 112699, speculatively reverted by echristo, since
I'm sure it is harmless.  Original commit message:
If PrototypeValue is erased in the middle of using the SSAUpdator
then the SSAUpdator may access freed memory.  Instead, simply pass
in the type and name explicitly, which is all that was used anyway.

llvm-svn: 112810
2010-09-02 08:14:03 +00:00
Bob Wilson 38ab35a911 Remove NEON vmull, vmlal, and vmlsl intrinsics, replacing them with multiply,
add, and subtract operations with zero-extended or sign-extended vectors.
Update tests.  Add auto-upgrade support for the old intrinsics.

llvm-svn: 112773
2010-09-01 23:50:19 +00:00
Dan Gohman faa30f531a Reword this comment. Don't mention outs(), as that's not what
this code is actually testing for.

llvm-svn: 112767
2010-09-01 23:33:02 +00:00
Dale Johannesen 092d3467bc Recommit with changes. Comment out palignr for the
moment, as there's a testcase that uses it and expects it
to be subject to optimizations; we won't be doing that.
Some adjustments based on feedback from Bill.

llvm-svn: 112754
2010-09-01 22:43:48 +00:00
Dale Johannesen a1a33fc252 Revert 112740, it broke some clang tests somehow...
llvm-svn: 112744
2010-09-01 21:36:44 +00:00
Dale Johannesen 973ddaa088 Add a few more missing MMX operations. This should be it.
llvm-svn: 112740
2010-09-01 21:03:03 +00:00
Owen Anderson 5925053b32 Disable CorrelatedValuePropagation while I track down selfhost failures.
llvm-svn: 112727
2010-09-01 19:20:46 +00:00
Owen Anderson c637c49c11 Tentatively add correlated value propagation to the set of standard passes.
llvm-svn: 112723
2010-09-01 18:30:15 +00:00
Eric Christopher a5d315c665 Speculatively revert 112699 and 112702, they seem to be causing
self host errors on clang-x86-64.

llvm-svn: 112719
2010-09-01 17:29:10 +00:00
Dan Gohman a2233f2801 Make tool_output_file's raw_ostream instance a member variable instead
of a base class.

This makes it possible to unregister the file from FilesToRemove when
the file is done. Also, this eliminates the need for
formatted_tool_output_file.

llvm-svn: 112706
2010-09-01 14:20:41 +00:00
Dan Gohman e201c07d23 Add an interface for unregistering a file from the FilesToRemove list.
llvm-svn: 112705
2010-09-01 14:17:34 +00:00
Michael J. Spencer c582c7b5c9 COFF: Fix incorrect SCT_COMPLEX_TYPE_SHIFT. Add a few constants.
llvm-svn: 112703
2010-09-01 14:09:36 +00:00
Dan Gohman 858806fb8b Make the iterator form of erase return void, since it always succeeds,
and since this is what std::map and std::set do.

llvm-svn: 112701
2010-09-01 14:00:35 +00:00
Duncan Sands 2afaef80e9 Define LLVM_GLOBAL_VISIBILITY to be __declspec(dllexport) on
windows systems.

llvm-svn: 112700
2010-09-01 13:07:11 +00:00
Duncan Sands f7b18437b5 If PrototypeValue is erased in the middle of using the SSAUpdator
then the SSAUpdator may access freed memory.  Instead, simply pass
in the type and name explicitly, which is all that was used anyway.

llvm-svn: 112699
2010-09-01 10:29:33 +00:00
Duncan Sands 5e2e7d7ff3 Add convenience class for working with eh.exception calls.
llvm-svn: 112698
2010-09-01 09:26:00 +00:00
Dan Gohman 110ed64fbb Revert 112442 and 112440 until the compile time problems introduced
by 112440 are resolved.

llvm-svn: 112692
2010-09-01 01:45:53 +00:00