Commit Graph

68982 Commits

Author SHA1 Message Date
Dan Gohman e603710d11 Simplify a few more uses of reg_iterator.
llvm-svn: 82812
2009-09-25 22:26:13 +00:00
Dan Gohman 5edd45a76b Simplify this code by using use_iterator instead of reg_iterator
and skipping the defs.

llvm-svn: 82811
2009-09-25 22:24:52 +00:00
Steve Naroff 43b118fc2c Fix cut/paste error resulting in bad column info.
llvm-svn: 82810
2009-09-25 22:15:54 +00:00
Steve Naroff 2676089407 Add clang_getDeclSource().
llvm-svn: 82807
2009-09-25 21:45:39 +00:00
Douglas Gregor d90fd526d3 Declarators can now properly represent template-ids, e.g., for
template void f<int>(int);
                ~~~~~~
Previously, we silently dropped the template arguments. With this
change, we now use the template arguments (when available) as the
explicitly-specified template arguments used to aid template argument
deduction for explicit template instantiations.

llvm-svn: 82806
2009-09-25 21:45:23 +00:00
Evan Cheng fd6aad7f1c Code clean up and prepare for Thumb2 support. No functionality changes.
llvm-svn: 82805
2009-09-25 21:44:53 +00:00
Evan Cheng 3872b3c13e Flip -disable-post-RA-scheduler to -post-RA-scheduler.
llvm-svn: 82803
2009-09-25 21:38:11 +00:00
Steve Naroff 63f475a212 Add clang_getDeclLine and clang_getDeclColumn
Fix clang_getCursorDecl to do the right thing for expr refs
Fixup test file to accommodate new output (which includes the line/column for the referenced decl)

llvm-svn: 82798
2009-09-25 21:32:34 +00:00
Jeffrey Yasskin 14a5cc54e5 Fix a compile failure introduced by r82675 on MinGW which doesn't have
setenv().  This patch just disables the test rather than getting putenv() to
work.  Thanks to Sandeep Patel for reporting the problem.

llvm-svn: 82797
2009-09-25 21:07:20 +00:00
Dale Johannesen f6a987b784 Handle sqrt in CannotBeNegativeZero. absf and absl
appear to be misspellings, removed in favor of fabs*.

llvm-svn: 82796
2009-09-25 20:54:50 +00:00
Dan Gohman 48b185d6f7 Improve MachineMemOperand handling.
- Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions.
   This eliminates MachineInstr's std::list member and allows the data to be
   created by isel and live for the remainder of codegen, avoiding a lot of
   copying and unnecessary translation. This also shrinks MemSDNode.
 - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated
   fields for MachineMemOperands.
 - Change MemSDNode to have a MachineMemOperand member instead of its own
   fields with the same information. This introduces some redundancy, but
   it's more consistent with what MachineInstr will eventually want.
 - Ignore alignment when searching for redundant loads for CSE, but remember
   the greatest alignment.

Target-specific code which previously used MemOperandSDNodes with generic
SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range
so that the SelectionDAG framework knows that MachineMemOperand information
is available.

llvm-svn: 82794
2009-09-25 20:36:54 +00:00
Fariborz Jahanian 49850dfc4e Refixed pr5050 per Anders comment. Test case enhanced
per Doug's comment.

llvm-svn: 82791
2009-09-25 18:59:21 +00:00
Dan Gohman 32f71d714b Rename getTargetNode to getMachineNode, for consistency with the
naming scheme used in SelectionDAG, where there are multiple kinds
of "target" nodes, but "machine" nodes are nodes which represent
a MachineInstr.

llvm-svn: 82790
2009-09-25 18:54:59 +00:00
Douglas Gregor 450f0084a2 WIP implementation of explicit instantiation of function templates,
member functions of class template specializations, and static data
members. The mechanics are (mostly) present, but the semantic analysis
is very weak.

llvm-svn: 82789
2009-09-25 18:43:00 +00:00
David Goodwin bea6848f9d Finish scheduling itineraries for NEON.
llvm-svn: 82788
2009-09-25 18:38:29 +00:00
Dale Johannesen 114e105662 Add readonly to some sin and cos calls; transformations
being checked aren't valid without it.

llvm-svn: 82786
2009-09-25 18:15:29 +00:00
Victor Hernandez e6ff7662b6 Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it causes regressions in the nightly tests.
llvm-svn: 82784
2009-09-25 18:11:52 +00:00
Fariborz Jahanian 5aec1b54bc Fix the AST tree so ir-gen can do the conversion via copy construction.
Fixed pr5050.

llvm-svn: 82783
2009-09-25 18:11:25 +00:00
Mike Stump 1dbb8f78a3 Fix 80-col violation.
llvm-svn: 82782
2009-09-25 18:11:00 +00:00
Dale Johannesen a318d91a1e Make sure sin, cos, sqrt calls are marked readonly
before producing FSIN, FCOS, FSQRT.  If they aren't
so marked we have to assume they might set errno.

llvm-svn: 82781
2009-09-25 18:00:35 +00:00
Chris Lattner 0a4c44bdf4 reject attempts to use ()'s in patterns, these are reserved for filecheck.
llvm-svn: 82780
2009-09-25 17:29:36 +00:00
Chris Lattner b16ab0c40a reimplement the regex matching strategy by building a single
regex and matching it instead of trying to match chunks at a time.
Matching chunks at a time broke with check lines like 
  CHECK: foo {{.*}}bar
because the .* would eat the entire rest of the line and bar would
never match.

Now we just escape the fixed strings for the user, so that something
like:
  CHECK: a() {{.*}}???
is matched as:
  CHECK: {{a\(\) .*\?\?\?}}
transparently "under the covers".

llvm-svn: 82779
2009-09-25 17:23:43 +00:00
Dale Johannesen c72134269f Generate FSQRT from calls to the sqrt function, which
allows appropriate backends to generate a sqrt instruction.

On x86, this isn't done at -O0 because we go through
FastISel instead.  This is a behavior change from before
this series of sqrt patches started.  I think this is OK
considering that compile speed is most important at -O0, but
could be convinced otherwise.

llvm-svn: 82778
2009-09-25 17:23:22 +00:00
Chris Lattner 221460e0be special case Patterns that are a single fixed string. This is a microscopic
perf win and is needed for future changes.

llvm-svn: 82777
2009-09-25 17:09:12 +00:00
Dale Johannesen 722212d1a0 Revise C library functions description to be vaguer, per Chris.
llvm-svn: 82776
2009-09-25 17:04:42 +00:00
Jeffrey Yasskin db281085c5 This patch causes the --enable-debug-runtime configure flag and the
DEBUG_RUNTIME Makefile variable to pass -g to gcc when building LLVM's objects.
Without this, it's very hard to debug crashes that happen in Release-Asserts
mode but not Debug mode.

llvm-svn: 82775
2009-09-25 16:46:09 +00:00
Chris Lattner 880d2d5788 pcc supports some c99
llvm-svn: 82774
2009-09-25 16:45:10 +00:00
Bob Wilson f7fe0132c9 Add some comments to clarify things that I discovered this week.
llvm-svn: 82773
2009-09-25 16:34:46 +00:00
Daniel Dunbar e813b22b13 Make llvm-bcanalyzer percentages more readable.
llvm-svn: 82772
2009-09-25 16:04:21 +00:00
Daniel Dunbar 75359a7c2f Strip trailing whitespace.
llvm-svn: 82771
2009-09-25 16:03:57 +00:00
Anders Carlsson d7d358a65e Even more work on empty classes.
llvm-svn: 82770
2009-09-25 15:39:00 +00:00
Bob Wilson d60367c198 pr4926: ARM requires the stack pointer to be aligned, even for leaf functions.
For the AAPCS ABI, SP must always be 4-byte aligned, and at any "public
interface" it must be 8-byte aligned.  For the older ARM APCS ABI, the stack
alignment is just always 4 bytes.  For X86, we currently align SP at
entry to a function (e.g., to 16 bytes for Darwin), but no stack alignment
is needed at other times, such as for a leaf function.

After discussing this with Dan, I decided to go with the approach of adding
a new "TransientStackAlignment" field to TargetFrameInfo.  This value
specifies the stack alignment that must be maintained even in between calls.
It defaults to 1 except for ARM, where it is 4.  (Some other targets may
also want to set this if they have similar stack requirements. It's not
currently required for PPC because it sets targetHandlesStackFrameRounding
and handles the alignment in target-specific code.) The existing StackAlignment
value specifies the alignment upon entry to a function, which is how we've
been using it anyway.

llvm-svn: 82767
2009-09-25 14:41:49 +00:00
Duncan Sands 3cf0cdee4c Print INST_INBOUNDS_GEP rather than UnknownCode30.
Likewise for constant inbounds GEP.

llvm-svn: 82763
2009-09-25 12:28:37 +00:00
Benjamin Kramer 07fec3bbf5 Fix MSVC build by renaming a variable. PR5043
llvm-svn: 82762
2009-09-25 11:47:22 +00:00
Douglas Gregor 25a3967ebb Sigh. Be *really* careful when copying a default function argument during template instantiation
llvm-svn: 82761
2009-09-25 07:03:22 +00:00
Douglas Gregor c103ccd855 Be careful about copying uninstantiated default arguments during template instantiation
llvm-svn: 82760
2009-09-25 06:56:31 +00:00
Chris Lattner 233117b7f6 convert testcases to filecheck.
llvm-svn: 82759
2009-09-25 06:49:41 +00:00
Chris Lattner 712e8e03a5 filecheck should not match a \n with a .
llvm-svn: 82758
2009-09-25 06:47:09 +00:00
Douglas Gregor dc880d67f7 Don't look for __builtin_va_list; it isn't present for all targets
llvm-svn: 82757
2009-09-25 06:44:41 +00:00
Chris Lattner 812e594454 remove a large unreduced testcase
llvm-svn: 82756
2009-09-25 06:37:22 +00:00
Douglas Gregor 43bc1a7483 CMake build support for libCIndex and c-index-test. The indexing tests
are now running properly from within CMake.

llvm-svn: 82755
2009-09-25 06:35:15 +00:00
Chris Lattner b121a24f25 turn a std::pair into a real class.
llvm-svn: 82754
2009-09-25 06:32:47 +00:00
Nate Begeman 18150d5abc Fix combiner-aa issue with bases which are different, but can alias.
Previously, it treated GV+28 GV+0 as different bases, and assumed they could
not alias.

llvm-svn: 82753
2009-09-25 06:05:26 +00:00
Ted Kremenek 05e6f5b6e9 Turn on 'RegionStore' as the default store manager both for 'clang --analyze' and 'scan-build'. Leave 'BasicStore' as the default store manager in 'clang-cc'. While there are still known warts with RegionStore, it's ready to be tested by general users.
llvm-svn: 82752
2009-09-25 05:55:59 +00:00
Douglas Gregor 9e84d88d27 Hide clang-wpa executable behind a CMake variable so it won't be built by default
llvm-svn: 82751
2009-09-25 05:41:21 +00:00
Bob Wilson 0bb2a929a2 Update the description of MachineFrameInfo's OffsetAdjustment. The value of
this adjustment does not change the direction or the signs of the object
offsets, and the details of the offset calculations can be target-specific.
Also mention that for most targets this value is only used to generate debug
info.

llvm-svn: 82750
2009-09-25 05:30:55 +00:00
Ted Kremenek 1947a7a338 Update checker build.
llvm-svn: 82749
2009-09-25 05:03:45 +00:00
Douglas Gregor 56751b5981 Fix checking for a null pointer constant when the expression itself is
value-dependent. Audit (and fixed) all calls to
Expr::isNullPointerConstant() to provide the correct behavior with
value-dependent expressions. Fixes PR5041 and a crash in libstdc++
<locale>.

In the same vein, properly compute value- and type-dependence for
ChooseExpr. Fixes PR4996.

llvm-svn: 82748
2009-09-25 04:25:58 +00:00
John McCall 6cb02c1d7e Add a reduced test case for the weak ivar infinite recursion.
llvm-svn: 82747
2009-09-25 02:18:37 +00:00
Anders Carlsson e1883100a3 Who would have thought that empty classes were so tricky? Handle cases where an empty virtual base class needs to be moved aside because it conflicts with the first field.
llvm-svn: 82746
2009-09-25 01:54:38 +00:00