Commit Graph

48991 Commits

Author SHA1 Message Date
Dale Johannesen
3d7ece1acb Add comments to explain uint64->f64 algorithm,
well, sort of.  (Algorithm by Ian Ollmann.)

llvm-svn: 57932
2008-10-21 23:07:49 +00:00
Ted Kremenek
518b17e8f3 Updated checker build.
llvm-svn: 57931
2008-10-21 21:56:56 +00:00
Daniel Dunbar
29fa8354fc Add coverage of part of getPrimaryDecl that was failing prior to
previous commit.

llvm-svn: 57930
2008-10-21 21:32:38 +00:00
Daniel Dunbar
445693afaf Fix use of dyn_cast.
llvm-svn: 57927
2008-10-21 21:22:32 +00:00
Dale Johannesen
28929589e7 Add an SSE2 algorithm for uint64->f64 conversion.
The same one Apple gcc uses, faster.  Also gets the
extreme case in gcc.c-torture/execute/ieee/rbug.c
correct which we weren't before; this is not
sufficient to get the test to pass though, there
is another bug.

llvm-svn: 57926
2008-10-21 20:50:01 +00:00
Dan Gohman
8b44b88eff Fix SelectionDAGBuild lowering of Select instructions to
handle first-class aggregate values. Also, fix a bug in
the Ret handling for empty aggregates.

llvm-svn: 57925
2008-10-21 20:00:42 +00:00
Daniel Dunbar
30c514e763 Add GetModule accessor to ModuleBuilder
llvm-svn: 57924
2008-10-21 19:55:09 +00:00
Daniel Dunbar
1ca20df437 Clear raw_fd_ostream error string on success and explain behavior in
documentation.

Add C++ header marker.

llvm-svn: 57923
2008-10-21 19:53:10 +00:00
Dan Gohman
c7d4f28254 Updated email address.
llvm-svn: 57920
2008-10-21 19:50:00 +00:00
Ted Kremenek
677fba12a5 When conjuring symbols for compound assignments, use the promoted type to determine if the symbolic value as a "loc::" or "nonloc::" value.
llvm-svn: 57917
2008-10-21 19:49:01 +00:00
Dan Gohman
4ddf7a4c22 Implement the optimized FCMP_OEQ/FCMP_UNE code for x86 fast-isel.
llvm-svn: 57915
2008-10-21 18:24:51 +00:00
Steve Naroff
5cfa5af630 Fix <rdar://problem/6257645> clang static analyzer crashes when encountering blocks as objects
ASTContext::isObjCObjectPointerType() needs to consider blocks as objects.

Note: My previous commit was done in the test directory...as a result, this commit was necessary.
llvm-svn: 57914
2008-10-21 18:24:04 +00:00
Steve Naroff
e94444faf3 Fix <rdar://problem/6257645> clang static analyzer crashes when encountering blocks as objects
ASTContext::isObjCObjectPointerType() needs to consider blocks as objects.

llvm-svn: 57913
2008-10-21 18:21:45 +00:00
Torok Edwin
016fa4cd0d Fix make check on Solaris 10/x86: the default grep is not GNU grep, same for as.
llvm-svn: 57912
2008-10-21 17:21:32 +00:00
Jim Grosbach
cfebc18d7c use pre-UAL mnemonics for push/pop for compilaton callback function
llvm-svn: 57911
2008-10-21 16:54:12 +00:00
Douglas Gregor
209ad9dc70 Cosmetic patch from João Paulo Rechi Vita
llvm-svn: 57910
2008-10-21 16:14:35 +00:00
Douglas Gregor
5251f1b283 Preliminary support for function overloading
llvm-svn: 57909
2008-10-21 16:13:35 +00:00
Ted Kremenek
0747e7e025 Handle [NSAutoreleasePool addObject:] (an alternative way to add objects to the current autorelease pool).
Added initial code for tracking stack of autorelease pools.

llvm-svn: 57908
2008-10-21 15:53:15 +00:00
Ted Kremenek
3e6c028297 Update Xcode project.
llvm-svn: 57907
2008-10-21 15:34:53 +00:00
Steve Naroff
90255b4f54 Fix a crasher during error recovery in Parser::ParseObjCTypeName().
Found this while fixing another unrelated radar.

llvm-svn: 57904
2008-10-21 14:15:04 +00:00
Steve Naroff
e020fa1b85 Fix <rdar://problem/6297052> confused in some way by embedded /* */ comments.
llvm-svn: 57903
2008-10-21 13:37:27 +00:00
Steve Naroff
56aa731a63 Update VC++ project files.
llvm-svn: 57902
2008-10-21 13:04:43 +00:00
Gabor Greif
09a5cf89ca Tweak an expected-error to match the output. IMHO it is better to diagnose 'int (void)' because it has the same meaning in C and C++.
llvm-svn: 57901
2008-10-21 11:46:36 +00:00
Nuno Lopes
94844e2054 fix a tricky bug in the JIT global variable emitter, that was triggered when JITing a variable independently of a function. This lead to sharing memory memory between functions and GVs thus changing the value of a GV could change the code in execution. more details on the ML.
llvm-svn: 57900
2008-10-21 11:42:16 +00:00
Steve Naroff
9ebc050ca7 Fix typo.
llvm-svn: 57899
2008-10-21 10:50:19 +00:00
Steve Naroff
a0ed165a84 Fix <rdar://problem/6261178> clang-on-xcode: [sema] multiple method warning is over enthusiastic.
Fix <rdar://problem/6265257> warnings for ambiguous message send swamp other warnings.

Reworked Sema::MatchTwoMethodDeclarations() to optionally match based on method size and alignment (the default in GCC). Changed Sema::LookupInstanceMethodInGlobalPool() to use this feature.

Added -Wno-struct-selector-match to driver, however didn't hook it up yet. Added a FIXME that says this.

llvm-svn: 57898
2008-10-21 10:37:50 +00:00
Zhongxing Xu
dab76fd822 Localize the special processing of array variable inside
GRExprEngine::VisitCast() so that other parts of the analyzer can be ignorant.
When we cast "array of type T" to "pointer to T", we get the loc::MemRegionVal
corresponding to the array variable. This is sufficient for BasicStore, but not
for RegionStore. RegionStore should get the element region for the first array
element in the cast. So next comes to the revamping of transfer functions for
different store model.

llvm-svn: 57897
2008-10-21 06:54:23 +00:00
Zhongxing Xu
8f6855e642 Modify Store interface: GetSVal/SetSVal => Retrieve/Bind.
llvm-svn: 57896
2008-10-21 06:27:32 +00:00
Ted Kremenek
0aee1cd5a3 Add partial specialization of ImmutableList for GRStatePartialTrait.
llvm-svn: 57895
2008-10-21 06:00:04 +00:00
Ted Kremenek
cdef990677 constify some methods and variables in ImmutableList.
llvm-svn: 57894
2008-10-21 05:59:33 +00:00
Zhongxing Xu
7ff32d0955 Rename:
RValues.h/cpp => SVals.h/cpp

llvm-svn: 57893
2008-10-21 05:41:03 +00:00
Zhongxing Xu
83aff7079f Process decls in RegionStore. Individual elements of fixed size arrays are
initialized to UndefinedVal.

llvm-svn: 57892
2008-10-21 05:29:26 +00:00
Zhongxing Xu
d8fe46b496 Add ElementRegion to represent memory chunks for array elements.
llvm-svn: 57891
2008-10-21 05:27:10 +00:00
Ted Kremenek
9667b7c9c0 Updated checker build
llvm-svn: 57890
2008-10-21 04:32:44 +00:00
Chris Lattner
192f27cb5c really fix run line
llvm-svn: 57889
2008-10-21 03:55:19 +00:00
Chris Lattner
b4ee2aebb5 fix run line
llvm-svn: 57888
2008-10-21 03:54:49 +00:00
Chris Lattner
0b641e4718 remove some unneeded eh generation
llvm-svn: 57887
2008-10-21 03:49:19 +00:00
Dan Gohman
c14e5227f0 Disable constant-offset folding for PowerPC, as the PowerPC target
isn't yet prepared for it.

llvm-svn: 57886
2008-10-21 03:41:46 +00:00
Dan Gohman
269246b034 Don't create TargetGlobalAddress nodes with offsets that don't fit
in the 32-bit signed offset field of addresses. Even though this
may be intended, some linkers refuse to relocate code where the
relocated address computation overflows.

Also, fix the sign-extension of constant offsets to use the
actual pointer size, rather than the size of the GlobalAddress
node, which may be different, for example on x86-64 where MVT::i32
is used when the address is being fit into the 32-bit displacement
field.

llvm-svn: 57885
2008-10-21 03:38:42 +00:00
Ted Kremenek
d346dfe881 Add fileid_iterator to SourceManager.
llvm-svn: 57878
2008-10-21 03:32:32 +00:00
Ted Kremenek
4e0f205145 Added method to access the raw flags of Token.
llvm-svn: 57877
2008-10-21 03:32:15 +00:00
Ted Kremenek
9f20b6a610 Change signature for CheckDivideZero.
llvm-svn: 57876
2008-10-21 03:31:53 +00:00
Dan Gohman
97d95d6d85 Optimized FCMP_OEQ and FCMP_UNE for x86.
Where previously LLVM might emit code like this:

        ucomisd %xmm1, %xmm0
        setne   %al
        setp    %cl
        orb     %al, %cl
        jne     .LBB4_2

it now emits this:

        ucomisd %xmm1, %xmm0
        jne     .LBB4_2
        jp      .LBB4_2

It has fewer instructions and uses fewer registers, but it does
have more branches. And in the case that this code is followed by
a non-fallthrough edge, it may be followed by a jmp instruction,
resulting in three branch instructions in sequence. Some effort
is made to avoid this situation.

To achieve this, X86ISelLowering.cpp now recognizes FCMP_OEQ and
FCMP_UNE in lowered form, and replace them with code that emits
two branches, except in the case where it would require converting
a fall-through edge to an explicit branch.

Also, X86InstrInfo.cpp's branch analysis and transform code now
knows now to handle blocks with multiple conditional branches. It
uses loops instead of having fixed checks for up to two
instructions. It can now analyze and transform code generated
from FCMP_OEQ and FCMP_UNE.

llvm-svn: 57873
2008-10-21 03:29:32 +00:00
Dan Gohman
c835458da9 When the coalescer is doing rematerializing, have it remove
the copy instruction from the instruction list before asking the
target to create the new instruction. This gets the old instruction
out of the way so that it doesn't interfere with the target's
rematerialization code. In the case of x86, this helps it find
more cases where EFLAGS is not live.

Also, in the X86InstrInfo.cpp, teach isSafeToClobberEFLAGS to check
to see if it reached the end of the block after scanning each
instruction, instead of just before. This lets it notice when the
end of the block is only two instructions away, without doing any
additional scanning.

These changes allow rematerialization to clobber EFLAGS in more
cases, for example using xor instead of mov to set the return value
to zero in the included testcase.

llvm-svn: 57872
2008-10-21 03:24:31 +00:00
Dan Gohman
97d3f6cfe3 Make the NaN test come second, heuristically assuming
that NaNs are less common.

llvm-svn: 57871
2008-10-21 03:12:54 +00:00
Dan Gohman
72e66eedb8 Use Function::getEntryBlock() instead of Function::front(), for clarity.
llvm-svn: 57870
2008-10-21 03:10:28 +00:00
Oscar Fuentes
0e12e5b12c CMake: updated lib/CodeGen/CMakeLists.txt
llvm-svn: 57869
2008-10-21 02:37:50 +00:00
Dan Gohman
fa29b67aee Fix a bug that prevented llvm-extract -delete from working.
llvm-svn: 57864
2008-10-21 01:08:07 +00:00
Ted Kremenek
8ab23ade80 Added the start of a prototype implementation of PCH based on token caching.
llvm-svn: 57863
2008-10-21 00:54:44 +00:00
Chris Lattner
4396e0d2c3 Fix gcc.c-torture/compile/920520-1.c by inserting bitconverts
for strange asm conditions earlier.  In this case, we have a
double being passed in an integer reg class.  Convert to like
sized integer register so that we allocate the right number 
for the class (two i32's for the f64 in this case).

llvm-svn: 57862
2008-10-21 00:45:36 +00:00