Commit Graph

45963 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes 7d5d402b16 Fixed call stack alignment. Improved AsmPrinter alignment issues.
llvm-svn: 53585
2008-07-15 02:03:36 +00:00
Ted Kremenek fd7efdf20d Provide an "Analysis Scope" for Analyses so checks can either be run on code declarations (bodies) or Objective-C @implementation blocks.
llvm-svn: 53584
2008-07-15 00:46:02 +00:00
Devang Patel 7688bed4ff LinkOnce definitions have default scope, like weak definitions. Otherwise, the linker may not be able to match LinkOnce definition from one module with an exteranl reference from other module.
llvm-svn: 53580
2008-07-15 00:00:11 +00:00
Ted Kremenek 5470e0c7e1 Re-enable missing -dealloc check.
llvm-svn: 53578
2008-07-14 23:56:31 +00:00
Ted Kremenek 70fe0ca126 Update Xcode project.
llvm-svn: 53577
2008-07-14 23:42:26 +00:00
Ted Kremenek 2fa70832e4 Using new clang option to invoke the type-signature check of Objective-C instance methods.
llvm-svn: 53576
2008-07-14 23:41:49 +00:00
Ted Kremenek 3063b73773 Break off declaration of Analysis enum into Analyses.def. The driver options in
clang.cpp now #include these definitions to create the command line options, and
AnalysisConsumer #includes this file to generate the switch statement to create
actions.

Renamed -check-objc-methodsigs to -warn-objc-methodsigs.

The "missing -dealloc" check is now optional: -warn-objc-missing-dealloc

llvm-svn: 53575
2008-07-14 23:41:13 +00:00
Evan Cheng 4015ae1d2c Goodbye tail duplication (for good this time).
llvm-svn: 53574
2008-07-14 22:29:15 +00:00
Ted Kremenek c18255d80f Refactor Dead Stores error reporting to use the simplified BugReporter::EmitBasicReport interface.
llvm-svn: 53573
2008-07-14 20:56:04 +00:00
Chris Lattner 1359c1d773 This replaces all $(SolutionDir) macros with $(ProjectDir)..\
Patch by Nicolas Capens!

llvm-svn: 53571
2008-07-14 18:46:16 +00:00
Dan Gohman adec96f438 Reapply 53476 and 53480, with a fix so that it properly updates
the BB member to the current basic block after emitting
instructions.

llvm-svn: 53567
2008-07-14 18:19:29 +00:00
Nate Begeman 191a6b1f1b http://llvm.org/bugs/show_bug.cgi?id=2523
Add some code to handle vector comparisons, which is the language side
of the llvm vicmp/vfcmp instructions.  Also make the vector-vector and
vector-scalar asign checks a bit more sane under the presence of lax vector
conversions.

llvm-svn: 53565
2008-07-14 18:02:46 +00:00
Dan Gohman 162668fa78 Fix uninitialized use of the Changed variable.
llvm-svn: 53564
2008-07-14 17:55:01 +00:00
Dan Gohman e7c8387616 Improve debug output for MemOperandSDNode. PseudoSourceValue nodes
don't have value names, so use print instead of getName() to get a
useful string.

llvm-svn: 53563
2008-07-14 17:51:24 +00:00
Dan Gohman 793357b115 Fix edito in the PseudoSourceValue name list.
llvm-svn: 53562
2008-07-14 17:45:47 +00:00
Dan Gohman 0c292dbb6c Reformat this message to fit in 80 cols.
llvm-svn: 53561
2008-07-14 17:43:27 +00:00
Ted Kremenek 0255531dd3 Added method "EmitBasicReport" to BugReporter to simplify the emission of simple bug diagnostics.
Refactored error reporting in CheckObjCDealloc and CheckObjCInstMethSignature to use this new bug reporting interface (major code simplification).

llvm-svn: 53560
2008-07-14 17:40:50 +00:00
Duncan Sands 673cf1836b I don't think BUILD_PAIR can have a vector result.
Remove support for this.

llvm-svn: 53559
2008-07-14 17:34:19 +00:00
Duncan Sands 0ca9a38f68 Tighten up some checks. Fix FPOWI splitting for
non-power-of-two vectors.

llvm-svn: 53558
2008-07-14 17:33:37 +00:00
Chris Lattner 8882b1c41c Reapply r53540, now with the matching header!
llvm-svn: 53557
2008-07-14 17:32:59 +00:00
Duncan Sands a30cbd9797 An INSERT_VECTOR_ELT can insert a larger value
than the vector element type.  Don't forget to
handle this when the insertion index is not a
constant.

llvm-svn: 53556
2008-07-14 17:32:02 +00:00
Duncan Sands 693185bcee According to the docs, it is possible to have an
extending load of a vector.  Handle this case when
splitting vector loads.  I'm not completely sure
what is supposed to happen, but I think it means
hi should be set to undef.  LegalizeDAG does not
consider this case.

llvm-svn: 53555
2008-07-14 17:27:46 +00:00
Duncan Sands b766084cb0 There should be no extending loads or truncating
stores of one-element vectors.  Also, neaten the
handling of INSERT_VECTOR_ELT when the inserted
type is larger than the vector element type.

llvm-svn: 53554
2008-07-14 17:22:31 +00:00
Duncan Sands d47d2d6b12 Ignore TargetConstant with an illegal type. These
are used for passing huge immediates in inline ASM
from the front-end straight down to the ASM writer.
Of course this is a hack, but it is simple, limited
in scope, works in practice, and is what LegalizeDAG
does.

llvm-svn: 53553
2008-07-14 17:15:45 +00:00
Chris Lattner 6d1a3c2e2b remove CGObjCEtoile until it compiles.
llvm-svn: 53552
2008-07-14 16:54:05 +00:00
Bruno Cardoso Lopes 80ab8f9649 Added Subtarget support into RegisterInfo
Added HasABICall and HasAbsoluteCall (equivalent to gcc -mabicall and 
-mno-shared). HasAbsoluteCall is not implemented but HasABICall is the 
default for o32 ABI. Now, both should help into a more accurate 
relocation types implementation. 
Added IsLinux is needed to choose between asm directives.
Instruction name strings cleanup.
AsmPrinter improved.

llvm-svn: 53551
2008-07-14 14:42:54 +00:00
Ted Kremenek a696ca66e9 Fix minor mistake in clang checkout instructions.
llvm-svn: 53550
2008-07-14 14:40:22 +00:00
Duncan Sands 68b0383057 Revert r53540 - it does not compile.
llvm-svn: 53549
2008-07-14 07:59:28 +00:00
Chris Lattner 0ead7a50b2 Reimplement LinkFunctionProtos in terms of GetLinkageResult. This fixes
the second half of link-global-to-func.ll and causes some minor changes in
messages.

There are two TODOs here.  First, this causes a regression in 
2008-07-06-AliasWeakDest.ll, which is now failing (so I xfailed it).  Anton,
I would really appreciate it if you could take a look at this.  It should be
a matter of adding proper alias support to GetLinkageResult, and was probably
already a latent bug that would manifest with globals.

The second todo is to reimplement LinkAlias in the same pattern as 
function and global linking.  This should be pretty straight-forward for 
someone who knows aliases, but isn't a requirement for correctness.

llvm-svn: 53548
2008-07-14 07:23:24 +00:00
Chris Lattner c08e7a00c3 don't do any linkage, not even type resolution, of symbols that have
internal linkage.

llvm-svn: 53547
2008-07-14 06:52:19 +00:00
Chris Lattner 34fc5a0eaa implement linking of globals to functions, in one direction
(replacing a function with a global).  This is needed when building
llvm itself with LTO on darwin, because of the EXPLICIT_SYMBOL hack
in lib/system/DynamicLibrary.cpp.

Implementation of linking the other way will need to wait for a 
cleanup of LinkFunctionProtos.

llvm-svn: 53546
2008-07-14 06:49:45 +00:00
Chris Lattner 177a3008e1 wrap long lines, remove some code from a non-assert build.
llvm-svn: 53545
2008-07-14 05:52:33 +00:00
Chris Lattner eab49263b5 Fix a bunch of bugs handling vector compare constant expressions, fixing
PR2317.

llvm-svn: 53544
2008-07-14 05:17:31 +00:00
Chris Lattner c5098a2877 Document and fix Constant::getVectorElements to return an empty vector
when presented with a constant expr.

If ConstantExpr::getV[IF]Cmp to work when ConstantFoldCompareInstruction
returns an undef or constant expr.  

llvm-svn: 53541
2008-07-14 05:10:41 +00:00
Chris Lattner 2831ad28be If a function calls setjmp, never inline it into other functions. This is
a hack around the fact that we don't represent the CFG correctly for sj/lj.
It fixes PR2486.

llvm-svn: 53540
2008-07-14 00:46:56 +00:00
Chris Lattner 6f5ea6e49c simplify some code, shuffle and insertelt always return a vector.
llvm-svn: 53538
2008-07-14 00:32:20 +00:00
Chris Lattner 3b81a821b4 whitespace fix.
llvm-svn: 53537
2008-07-14 00:28:45 +00:00
Chris Lattner 0c5183d9a5 doxygenate comments and wrap to 80 cols.
llvm-svn: 53536
2008-07-14 00:27:31 +00:00
Chris Lattner 8377c02308 Add a note.
llvm-svn: 53535
2008-07-14 00:19:59 +00:00
Chris Lattner 16395e51f4 Fix PR2506 by being a bit more careful about reverse fact propagation when
disproving a condition.  This actually compiles the existing testcase
(udiv_select_to_select_shift) to:

define i64 @test(i64 %X, i1 %Cond) {
entry:
	%divisor1.t = lshr i64 %X, 3		; <i64> [#uses=1]
	%quotient2 = lshr i64 %X, 3		; <i64> [#uses=1]
	%sum = add i64 %divisor1.t, %quotient2		; <i64> [#uses=1]
	ret i64 %sum
}

instead of:

define i64 @test(i64 %X, i1 %Cond) {
entry:
	%quotient1.v = select i1 %Cond, i64 3, i64 4		; <i64> [#uses=1]
	%quotient1 = lshr i64 %X, %quotient1.v		; <i64> [#uses=1]
	%quotient2 = lshr i64 %X, 3		; <i64> [#uses=1]
	%sum = add i64 %quotient1, %quotient2		; <i64> [#uses=1]
	ret i64 %sum
}

llvm-svn: 53534
2008-07-14 00:15:52 +00:00
Chris Lattner 80b03a1b49 Fix mishandling of the infinite loop case when merging two blocks. This
fixes PR2540.

llvm-svn: 53533
2008-07-13 22:23:11 +00:00
Chris Lattner 834ab4ec1b more refactoring. Use early exits instead of really complex logic.
No functionality change.

llvm-svn: 53532
2008-07-13 22:04:41 +00:00
Chris Lattner 5eed37224a improve comments.
llvm-svn: 53531
2008-07-13 21:55:46 +00:00
Chris Lattner 9aada1d755 factor another large hunk of code out into its own function.
No functionality change.

llvm-svn: 53530
2008-07-13 21:53:26 +00:00
Chris Lattner 8afd2f3016 add a description.
llvm-svn: 53529
2008-07-13 21:27:36 +00:00
Chris Lattner 55eaae1e0c Final bit of simplification for FoldBranchToCommonDest.
llvm-svn: 53528
2008-07-13 21:20:19 +00:00
Chris Lattner 1b317ea48a simplify logic a bit
llvm-svn: 53527
2008-07-13 21:15:11 +00:00
Chris Lattner 2e25b8f444 Refactor some code out into its own helper function, getting rid of crazy multiline
conditionals and commenting the code better.

No functionality change.

llvm-svn: 53526
2008-07-13 21:12:01 +00:00
Duncan Sands 2e6f7b49bf Fix comment.
llvm-svn: 53525
2008-07-13 20:14:38 +00:00
Cedric Venet 455298f2d6 test commit. Remove previously added line.
llvm-svn: 53524
2008-07-13 19:42:06 +00:00