Commit Graph

50453 Commits

Author SHA1 Message Date
Fariborz Jahanian e2caaaa13c Fixed bugzilla bug# 3095 related to code gen. for @synchronized.
llvm-svn: 59838
2008-11-21 19:21:53 +00:00
Dan Gohman 57d0b88830 Correctly set the isCtrl flag for chain dependencies.
llvm-svn: 59837
2008-11-21 19:17:25 +00:00
Dan Gohman 546bcfe8d6 Update comments.
llvm-svn: 59836
2008-11-21 19:16:58 +00:00
Sebastian Redl bd150f431e Implementation of new and delete parsing and sema.
This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first.

llvm-svn: 59835
2008-11-21 19:14:01 +00:00
Dan Gohman 8dfa51c5ef Update comments.
llvm-svn: 59834
2008-11-21 19:10:41 +00:00
Chris Lattner 841399c95a rearrange some fields.
llvm-svn: 59832
2008-11-21 18:59:21 +00:00
Chris Lattner cedef8d111 merge some simple call diagnostics.
llvm-svn: 59831
2008-11-21 18:44:24 +00:00
Chris Lattner 40bb0c83d4 print a type in a diagnostic.
llvm-svn: 59829
2008-11-21 18:27:34 +00:00
Fariborz Jahanian 735a4158d9 Fields of ivars of struct types are considered ivars
themselves for gc API generation purposes.

llvm-svn: 59828
2008-11-21 18:14:01 +00:00
Douglas Gregor 09075a99e0 Don't turn off blocks in C++
llvm-svn: 59827
2008-11-21 17:10:06 +00:00
Chris Lattner 0f137df0aa reapply the (corrected) patch to use the new llvm intrinsics for memcpy/memmove etc.
llvm-svn: 59824
2008-11-21 16:43:15 +00:00
Chris Lattner dd7083452f reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an
arbitrary integer width for the count.

llvm-svn: 59823
2008-11-21 16:42:48 +00:00
Douglas Gregor 5d58c3a568 Allow redeclaration of typedefs in C++
llvm-svn: 59822
2008-11-21 16:29:06 +00:00
Chris Lattner b7f4ce3de7 temporarily revert Sangiv's patch.
llvm-svn: 59821
2008-11-21 16:26:37 +00:00
Douglas Gregor 15799fd210 Tiny fix to the parsing of linkage-specifications
llvm-svn: 59820
2008-11-21 16:10:08 +00:00
Douglas Gregor b81897cda6 Fix overloading of non-static member functions that differ in their cv-qualifiers
llvm-svn: 59819
2008-11-21 15:36:28 +00:00
Douglas Gregor 9eb16eadfb Enable some more operator overloading tests, and don't look into an identifier for functions that might not have one
llvm-svn: 59818
2008-11-21 15:30:19 +00:00
Bill Wendling 4bce2bff88 Revert r59802. It was breaking the build of llvm-gcc:
g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS   -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic'
make[3]: *** [llvm-convert.o] Error 1
make[3]: *** Waiting for unfinished jobs....
rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

llvm-svn: 59809
2008-11-21 09:09:41 +00:00
Sanjiv Gupta 371298488b mem[cpy,set,move] intrinsics are now overloaded.
llvm-svn: 59806
2008-11-21 07:57:42 +00:00
Chris Lattner c5bab9f35e merge 3 more diagnostics into 1.
llvm-svn: 59805
2008-11-21 07:57:12 +00:00
Chris Lattner 2b78690a9c Add the concept of "modifiers" to the clang diagnostic format
strings.  This allows us to have considerable flexibility in how
these things are displayed and provides extra information that
allows us to merge away diagnostics that are very similar.

Diagnostic modifiers are a string of characters with the regex
[-a-z]+ that occur between the % and digit.  They may 
optionally have an argument that can parameterize them.

For now, I've added two example modifiers.  One is a very useful
tool that allows you to factor commonality across diagnostics
that need single words or phrases combined.  Basically you can
use %select{a|b|c}4 with with an integer argument that selects
either a/b/c based on an integer value in the range [0..3).

The second modifier is also an integer modifier, aimed to help
English diagnostics handle plurality.  "%s3" prints to 's' if 
integer argument #3 is not 1, otherwise it prints to nothing.
I'm fully aware that 's' is an English concept and doesn't
apply to all situations (mouse vs mice).  However, this is very
useful and we can add other crazy modifiers once we add support
for polish! ;-)

I converted a couple C++ diagnostics over to use this as an
example, I'd appreciate it if others could merge the other
likely candiates.  If you have other modifiers that you want,
lets talk on cfe-dev.

llvm-svn: 59803
2008-11-21 07:50:02 +00:00
Sanjiv Gupta 09a203765a Make mem[cpy,move,set] intrinsics overloaded.
llvm-svn: 59802
2008-11-21 07:49:09 +00:00
Bill Wendling 0b5be6c5e0 Default to converting UADDO to the generic form that SADDO is converted to.
llvm-svn: 59801
2008-11-21 07:44:30 +00:00
Nick Lewycky 07d726ec4d Optimize (x/y)*y into x-(x%y) in general. Div and rem are about the same, and
a subtract is cheaper than a multiply. This generalizes an existing transform.

llvm-svn: 59800
2008-11-21 07:33:58 +00:00
Chris Lattner 6b0cf14ba4 Change CheckIncrementDecrementOperand to test for common cases first
and fall through better.

llvm-svn: 59799
2008-11-21 07:05:48 +00:00
Chris Lattner 85a94a04f4 move the diagnostic location and ID out of DiagnosticInfo and store it in
the Diagnostic class. Since we can already only have one diagnostic in 
flight at a time, this shrinks DiagnosticInfo.

This reduces DiagnosticInfo to being basically a rather crazy smart pointer
to a DiagnosticInfo :)

llvm-svn: 59798
2008-11-21 06:59:12 +00:00
Chris Lattner b11c23da14 move diagnostic insertion methods to be free methods instead of
in the DiagnosticInfo class.  This requires marking them as taking
a const DiagnosticInfo, which is bogus (they logically mutate DI), 
but works with the C++ type system.

llvm-svn: 59797
2008-11-21 06:54:20 +00:00
Duraid Madina 132f6b472c LLVM does have a fortran FE!
llvm-svn: 59795
2008-11-21 06:26:56 +00:00
Chris Lattner adcbb7f85d testcase for PR3096
llvm-svn: 59794
2008-11-21 06:19:48 +00:00
Mon P Wang c311360909 Clean up normalization of shuffles
llvm-svn: 59792
2008-11-21 04:25:21 +00:00
Douglas Gregor 9ecea26443 Cleanup memory management in overloading of operator->, slightly
llvm-svn: 59791
2008-11-21 03:04:22 +00:00
Scott Michel c6918c1ffa CellSPU:
(a) Fix bgs 3052, 3057
(b) Incorporate Duncan's suggestions re: i1 promotion
(c) Indentation updates.

llvm-svn: 59790
2008-11-21 02:56:16 +00:00
Douglas Gregor 4fc308bd3b Don't print canonical types in overloading-related diagnostics
llvm-svn: 59789
2008-11-21 02:54:28 +00:00
Bill Wendling 5eee74446d Combine the two add with overflow intrinsics lowerings. They differ only in DAG node type.
llvm-svn: 59788
2008-11-21 02:38:44 +00:00
Dan Gohman d7d1fd7eb7 Set the isAntiDep flag in the MachineInstr scheduler.
llvm-svn: 59787
2008-11-21 02:38:21 +00:00
Bill Wendling 87c175e629 Generate code for llvm.uadd.with.overflow intrinsic. No conversion support yet.
llvm-svn: 59786
2008-11-21 02:33:36 +00:00
Dan Gohman f00cef4491 Add a flag to SDep for tracking which edges are anti-dependence edges.
llvm-svn: 59785
2008-11-21 02:27:52 +00:00
Bill Wendling cf678eddd0 Update comment to reflect a semblance of reality.
llvm-svn: 59784
2008-11-21 02:24:44 +00:00
Bill Wendling 8badb674eb Remove chains. Unnecessary.
llvm-svn: 59783
2008-11-21 02:22:59 +00:00
Dan Gohman 67b35bd4d1 Rename SDep's isSpecial to isArtificial, to make this field a little
less mysterious.

llvm-svn: 59782
2008-11-21 02:18:56 +00:00
Bill Wendling d10202bfb1 Add generic test for add with overflow.
llvm-svn: 59781
2008-11-21 02:15:51 +00:00
Bill Wendling 77538cc510 Rename "ADDO" to "SADDO" and "UADDO". The "UADDO" isn't equivalent to "ADDC"
because the boolean it returns to indicate an overflow may not be treated like
as a flag. It could be stored to memory, for instance.

llvm-svn: 59780
2008-11-21 02:12:42 +00:00
Bill Wendling 74296c60ff Implement the sadd_with_overflow intrinsic. This is converted into
"ISD::ADDO". ISD::ADDO is lowered into a target-independent form that does the
addition and then checks if the result is less than one of the operands. (If it
is, then there was an overflow.)

llvm-svn: 59779
2008-11-21 02:03:52 +00:00
Devang Patel 45f1ae028e Fix unused variable warnings.
llvm-svn: 59778
2008-11-21 01:52:59 +00:00
Dan Gohman d1f33e2397 Use ComputeLatency in the MachineInstr scheduler.
llvm-svn: 59777
2008-11-21 01:44:51 +00:00
Dan Gohman 63be531e09 Remove the CycleBound computation code from the ScheduleDAGRRList
schedulers. This doesn't have much immediate impact because
targets that use these schedulers by default don't yet provide
pipeline information.

This code also didn't have the benefit of register pressure
information. Also, removing it will avoid problems with list-burr
suddenly starting to do latency-oriented scheduling on x86 when we
start providing pipeline data, which would increase spilling.

llvm-svn: 59775
2008-11-21 01:30:54 +00:00
Chris Lattner fd384b1b3a Change -verify mode to find the "expected-error" and "expected-warning" strings
with a raw lexer instead of a PP lexer.  This means that -verify doesn't scan
#include'd headers for expected-error/warning strings, and it also means that it
doesn't ignore them in #if 0.

llvm-svn: 59774
2008-11-21 01:18:36 +00:00
Ted Kremenek 473d76e81d Add comment to IsFileLexer, clean up indentation, and tighten how it's written.
llvm-svn: 59773
2008-11-21 01:07:52 +00:00
Chris Lattner 66c8bebe81 remove expected-error from #if 0 section of code.
llvm-svn: 59772
2008-11-21 01:05:35 +00:00
Chris Lattner 4d7c58f0eb disable expected-errors in #if parts of the test.
llvm-svn: 59771
2008-11-21 01:05:04 +00:00