Commit Graph

55271 Commits

Author SHA1 Message Date
Douglas Gregor 5a80bd1504 Rework the way we find locally-scoped external declarations when we
need them to evaluate redeclarations or call a function that hasn't
already been declared. We now keep a DenseMap of these locally-scoped
declarations so that they are not visible but can be quickly found,
e.g., when we're looking for previous declarations or before we go
ahead and implicitly declare a function that's being called. Fixes
PR3672.

llvm-svn: 65792
2009-03-02 00:19:53 +00:00
Nate Begeman a9e981225e Fix a problem with DAGCombine on 64b targets where folding
extracts + build_vector into a shuffle would fail, because the
type of the new build_vector would not be legal.  Try harder to
create a legal build_vector type.  Note: this will be totally 
irrelevant once vector_shuffle no longer takes a build_vector for
shuffle mask.

New:
_foo:
	xorps	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	subps	%xmm1, %xmm1
	mulps	%xmm0, %xmm1
	addps	%xmm0, %xmm1
	movaps	%xmm1, 0

Old:
_foo:
	xorps	%xmm0, %xmm0
	movss	%xmm0, %xmm1
	xorps	%xmm2, %xmm2
	unpcklps	%xmm1, %xmm2
	pshufd	$80, %xmm1, %xmm1
	unpcklps	%xmm1, %xmm2
	pslldq	$16, %xmm2
	pshufd	$57, %xmm2, %xmm1
	subps	%xmm0, %xmm1
	mulps	%xmm0, %xmm1
	addps	%xmm0, %xmm1
	movaps	%xmm1, 0

llvm-svn: 65791
2009-03-01 23:44:07 +00:00
Chris Lattner 705f0b764e move gold plugin next to LTO doc in the subsystem section
llvm-svn: 65790
2009-03-01 23:42:51 +00:00
Nick Lewycky b750d2266d Add a quickstart example.
llvm-svn: 65789
2009-03-01 21:55:10 +00:00
Anders Carlsson 5878c797b3 Add BLOCK_HAS_DESCRIPTOR to global blocks.
llvm-svn: 65788
2009-03-01 21:09:29 +00:00
Nick Lewycky d70c8a8da6 Close list item tag, to conform with the style in this file. It's optional
anyways.

llvm-svn: 65787
2009-03-01 21:07:44 +00:00
Nick Lewycky f268c6b2a3 Add the gold plugin page to the documentation index!
llvm-svn: 65786
2009-03-01 21:06:42 +00:00
Nick Lewycky 236e926c5b Cleanup the description of flags to llvm-gcc. Also remove stray text in the
attribution.

llvm-svn: 65785
2009-03-01 20:58:07 +00:00
Mike Stump 3a139f3793 Be sure to mark blocks with no imports as being global.
llvm-svn: 65784
2009-03-01 20:07:53 +00:00
Nick Lewycky 6d1fc5c7e4 Don't forget the important part. llvm-gcc -use-gold-plugin passes the right
options to gold.

llvm-svn: 65783
2009-03-01 18:48:53 +00:00
Chris Lattner a01c21f616 simplify some code.
llvm-svn: 65782
2009-03-01 18:47:06 +00:00
Mikhail Glushenkov 254225489a Sprinkle llvmc notes with <tt>.
Also removes some trailing whitespace.

llvm-svn: 65781
2009-03-01 18:09:47 +00:00
Steve Naroff 8676e08730 Fix <rdar://problem/6248764> parser rejects: bad receiver type 'CFStringRef'.
Downgrade an error to a warning (for GCC compatibility).

llvm-svn: 65779
2009-03-01 17:14:31 +00:00
Gabor Greif 144fa6a08a Another sentinel optimization. This one should always
be a win, since almost every interesting function has at least one Argument.

llvm-svn: 65778
2009-03-01 17:13:15 +00:00
Douglas Gregor 5741efbba0 Fix PR3509 by providing correct starting locations for initializer lists
llvm-svn: 65777
2009-03-01 17:12:46 +00:00
Gabor Greif 6f8d4ae3c0 Reuse a technique (pioneered for BasicBlocks) of superposing ilist with
its sentinel. This is quite a win when a function really has a basic block.                  
When the function is just a declaration (and stays so) the old way did not
allocate a sentinel. So this change is most beneficial when the ratio of
function definition to declaration is high. I.e. linkers etc. Incidentally  
these are the most resource demanding applications, so I expect that the
reduced malloc traffic, locality and space savings outweigh the cost of
addition of two pointers to Function.

llvm-svn: 65776
2009-03-01 16:38:10 +00:00
Duncan Sands 491f9e89ae Functions marked malloc are noalias return.
llvm-svn: 65775
2009-03-01 16:19:31 +00:00
Steve Naroff 114aecb26b Fix <rdar://problem/6619539> incompatible pointer types sending 'XCElementSpacer *', expected 'XCElement *' (not handling protocol signatures correctly?).
- Reworked ASTContext::canAssignObjCInterfaces().
- Added ObjCProtocolDecl::lookupProtocolNamed().

llvm-svn: 65773
2009-03-01 16:12:44 +00:00
Duncan Sands 3d23bb03c1 Tweak this a bit.
llvm-svn: 65772
2009-03-01 15:19:03 +00:00
Duncan Sands ef821b5fbe Adjust this test for recent llvm-gcc changes.
llvm-svn: 65771
2009-03-01 15:01:51 +00:00
Nick Lewycky b603c73e76 Fix grammar.
llvm-svn: 65769
2009-03-01 09:51:07 +00:00
Gabor Greif b122c4cb1d fix a comment
llvm-svn: 65768
2009-03-01 09:45:52 +00:00
Gabor Greif 19b2d443b5 Fix a typo. Thanks baldrick!
llvm-svn: 65767
2009-03-01 09:43:41 +00:00
Nick Lewycky 0a71fa9dc3 First pass at a document describing how to achieve LTO on Linux with gold.
llvm-svn: 65766
2009-03-01 09:38:29 +00:00
Duncan Sands 2166cb7673 Another point to mention.
llvm-svn: 65765
2009-03-01 08:26:19 +00:00
Ted Kremenek 07e95680fd Rename AnonTypedRegion to TypedViewRegion.
llvm-svn: 65764
2009-03-01 05:44:08 +00:00
Ted Kremenek b90a75e55d Adjust wording of bug names.
llvm-svn: 65763
2009-03-01 05:43:22 +00:00
Daniel Dunbar 88367f2768 Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed.
llvm-svn: 65762
2009-03-01 04:51:18 +00:00
Daniel Dunbar b1559a4499 Obj-C non fragile ABI: Add GetInterfaceEHType for getting the Obj-C
exception typeinfo metadata, and a few other EH related types/functions.
 - No functionality change.

llvm-svn: 65761
2009-03-01 04:46:24 +00:00
Daniel Dunbar c6928bbe29 NeXT: Unify code for creating a class global.
- No functionality change.

llvm-svn: 65760
2009-03-01 04:40:10 +00:00
Daniel Dunbar 947bca2cc9 ObjCAtCatchStmt's ParamStmt is always a DeclStmt.
llvm-svn: 65759
2009-03-01 04:28:32 +00:00
Bill Wendling 38eae046cf Temporarily revert r65755. It was causing failures in the self-hosting
testsuite:

Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/nancvt.ll
Failed with exit(1) at line 2
while running: grep 2147027116 nancvt.ll.tmp | count 3
count: expected 3 lines and got        0.
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll
Failed with exit(1) at line 1
while running:  llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll |  opt -scalarrepl -instcombine |   llc -march=x86 -mcpu=yonah | not /usr/bin/grep sub.*esp
      subl      $28, %esp
      subl      $28, %esp
child process exited abnormally

And more.

llvm-svn: 65758
2009-03-01 03:55:12 +00:00
Chris Lattner d3fd8fb3ac testcase for mike's fix for PR3612
llvm-svn: 65757
2009-03-01 03:26:22 +00:00
Chris Lattner c92d769b41 add some llvmc notes from Mikhail
llvm-svn: 65756
2009-03-01 02:30:21 +00:00
Chris Lattner e2bb5e31c8 hoist the check for alloca size up so that it controls CanConvertToScalar
as well as isSafeAllocaToScalarRepl.

llvm-svn: 65755
2009-03-01 02:26:47 +00:00
Daniel Dunbar 53f12b11dc This test requires blocks.
llvm-svn: 65754
2009-03-01 02:20:08 +00:00
Anders Carlsson 3113eedc8a Remove debugging code.
llvm-svn: 65753
2009-03-01 02:12:54 +00:00
Evan Cheng c2f95b56db Minor optimization:
Look for situations like this:                                                                                                                                                              
%reg1024<def> = MOV r1                                                                                                                                                                      
%reg1025<def> = MOV r0                                                                                                                                                                      
%reg1026<def> = ADD %reg1024, %reg1025                                                                                                                                                      
r0            = MOV %reg1026                                                                                                                                                                
Commute the ADD to hopefully eliminate an otherwise unavoidable copy.

llvm-svn: 65752
2009-03-01 02:03:43 +00:00
Anders Carlsson 961763e35a Emit errors about unsupported blocks features.
llvm-svn: 65751
2009-03-01 01:45:25 +00:00
Chris Lattner 25f282f566 tweak this to accept asmprinter changes. I have no way to verify this, hopefully
the buildbot will work.

llvm-svn: 65750
2009-03-01 01:28:40 +00:00
Anders Carlsson 655129990a Initialize NSConcreteStackBlock
llvm-svn: 65749
2009-03-01 01:17:11 +00:00
Chris Lattner 242d91a476 simplify handling "don't print top level name" processing, so that we get
stuff like %A = type { %A*} instead of an upref.

llvm-svn: 65748
2009-03-01 01:16:21 +00:00
Bob Wilson d8ea0e144e Combine PPC's GetConstantBuildVectorBits and isConstantSplat functions to a new
method in a BuildVectorSDNode "pseudo-class".

llvm-svn: 65747
2009-03-01 01:13:55 +00:00
Anders Carlsson ed5e69fe50 Do some blocks cleanup and simplification. Fix a crash, and add a test case.
llvm-svn: 65746
2009-03-01 01:09:12 +00:00
Chris Lattner e87da66562 adjust to changes in the mainline llvm .ll printer.
llvm-svn: 65745
2009-03-01 00:59:19 +00:00
Chris Lattner 9ef10f4638 "This patch uses the new ObjCImplDecl class to merge Sema::ImplMethodsVsClassMethods and Sema::ImplCategoryMethodsVsIntfMethods methods.
And now, when clang check a class implementation to find unimplemented methods, it also checks all methods from the class extensions (unnamed categories).

There is also a test case to check this warning.

This patch contains also a minor update for ObjCImplDecl . getNameAsCString and getNameAsString now returns an empty string instead of crashing for unnamed categories."

Patch by Jean-Daniel Dupas!

llvm-svn: 65744
2009-03-01 00:56:52 +00:00
Chris Lattner 89d856e9e0 Fix a pretty awesome bug that only happened in a strange case with anonymous
types.  This was reading the uint for the keyword after the token was advanced.

llvm-svn: 65743
2009-03-01 00:53:13 +00:00
Chris Lattner 84516481f2 walk type symbol table also, so we get:
type opaque		; type %0
	%C = type { %0, %0 }

instead of:

	%C = type { opaque, opaque }

when appropriate.

llvm-svn: 65742
2009-03-01 00:32:33 +00:00
Chris Lattner 3c4f6be2b4 adjust for asmprinter change.
llvm-svn: 65741
2009-03-01 00:26:51 +00:00
Chris Lattner fb97bdc6a7 adjust for asmprinter change.
llvm-svn: 65740
2009-03-01 00:25:46 +00:00