Commit Graph

80683 Commits

Author SHA1 Message Date
Fariborz Jahanian 9b37b1d6bb Allow conversion of qualified Class type to unqualified
Class type to match gcc's. Fixes radar 7789113.

llvm-svn: 99425
2010-03-24 21:00:27 +00:00
Nate Begeman 583e05d8ce BUILD_VECTOR was missing out on some prime opportunities to use SSE 4.1 inserts.
llvm-svn: 99423
2010-03-24 20:49:50 +00:00
Douglas Gregor cc9c92cfc2 XFAIL the -nostdinc++ test on Windows; it doesn't look like we even have the notion of separate C and C++ paths there
llvm-svn: 99422
2010-03-24 20:45:20 +00:00
Douglas Gregor b8ddb138a9 Control warnings about GNU extensions with -Wgnu, which has a subgroup
for GNU designated-initializer syntax (-Wgnu-designator).

llvm-svn: 99421
2010-03-24 20:42:51 +00:00
Bob Wilson 4d87012eb3 Revert Edwin's change that is breaking MultiSource/Applications/ClamAV/clamscan.
--- Reverse-merging r99400 into '.':
D    test/CodeGen/Generic/2010-03-24-liveintervalleak.ll
U    lib/CodeGen/LiveIntervalAnalysis.cpp

llvm-svn: 99419
2010-03-24 20:25:25 +00:00
Evan Cheng c12c2d9bb4 Move OptChkCall off LibCallOptimization into StrCpyOpt.
llvm-svn: 99418
2010-03-24 20:19:04 +00:00
Douglas Gregor 64b046fce4 Implement support for -nostdc++. Fixes PR6446.
llvm-svn: 99417
2010-03-24 20:13:48 +00:00
Dan Gohman 8e404fe769 Trim #includes.
llvm-svn: 99416
2010-03-24 19:56:17 +00:00
Johnny Chen e99953ce9c Reverted r99326 which added NVdVmVCVTFrm, and later renamed to NVCVTFrm.
NVCVTFrm will later be used to describe "vcvt with fractional bits".

llvm-svn: 99415
2010-03-24 19:47:14 +00:00
Dan Gohman b452d4e9e4 Fix minor style issues.
llvm-svn: 99414
2010-03-24 19:38:02 +00:00
Dan Gohman 4634b7d4f6 It's not necessary to call raw_ostream::close explicitly on automatic
raw_ostream variables immediately before they go out of scope.

llvm-svn: 99413
2010-03-24 19:00:02 +00:00
Devang Patel d7a6cc5129 Do not rely on getCompileUnit() to find source file information for a subprogram.
llvm-svn: 99410
2010-03-24 18:48:00 +00:00
Johnny Chen da44d5977f Reverted r99376. The disassembler will deal with the 2-reg format of these two
N3VX instructions using special case code.

llvm-svn: 99409
2010-03-24 18:46:34 +00:00
Fariborz Jahanian c5b7bfc657 Improve diagnostics when ivar added to class
extension (radar 6812436).

llvm-svn: 99408
2010-03-24 18:08:23 +00:00
Douglas Gregor 8fdd0e8cd6 Silently drop dependent friend function template specializations,
since we have absolutely no way to match them when they are declared
nor do we have a way to represent these parsed-but-not-checked friend
declarations.

llvm-svn: 99407
2010-03-24 17:31:23 +00:00
Douglas Gregor 2538674a98 Change two class forward declarations to struct forward declarations, silencing a Clang warning
llvm-svn: 99405
2010-03-24 16:59:08 +00:00
Fariborz Jahanian 47b4629b3b Code gen for multi-dimensional dynamic allocations.
Fixes PR6641.

llvm-svn: 99404
2010-03-24 16:57:01 +00:00
Anders Carlsson e90954de64 More vtable improvements. We now compute and keep track of all vtable related information which avoids computing the same vtable layout over and over.
llvm-svn: 99403
2010-03-24 16:42:11 +00:00
Jim Grosbach 07607382d8 tweak the arm if conversion heuristic
llvm-svn: 99402
2010-03-24 16:15:14 +00:00
Torok Edwin 4bbfdd41ea Fix memory leak in liveintervals: the destructor for VNInfos must be called,
otherwise the SmallVector it contains doesn't free its memory.
In most cases LiveIntervalAnalysis could get away by not calling the destructor,
because VNInfos are bumpptr-allocated, and smallvectors usually don't grow.
However when the SmallVector does grow it always leaks.

This is the valgrind shown leak from the original testcase:
==8206== 18,304 bytes in 151 blocks are definitely lost in loss record 164 of 164
==8206==    at 0x4A079C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==8206==    by 0x4DB7A7E: llvm::SmallVectorBase::grow_pod(unsigned long, unsigned long) (in /home/edwin/clam/git/builds/defaul
t/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4F90382: llvm::VNInfo::addKill(llvm::SlotIndex) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libcl
amav.so.6.1.0)
==8206==    by 0x5126B5C: llvm::LiveIntervals::handleVirtualRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::M
achineInstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int, llvm::LiveInterval&) (in /home/edwin/clam/git/builds/defau
lt/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x512725E: llvm::LiveIntervals::handleRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::MachineI
nstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav
.so.6.1.0)
==8206==    by 0x51278A8: llvm::LiveIntervals::computeIntervals() (in /home/edwin/clam/git/builds/default/libclamav/.libs/libc
lamav.so.6.1.0)
==8206==    by 0x5127CB4: llvm::LiveIntervals::runOnMachineFunction(llvm::MachineFunction&) (in /home/edwin/clam/git/builds/de
fault/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAE935: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAEB10: llvm::FunctionPassManagerImpl::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAED3D: llvm::FunctionPassManager::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclamav/.l
ibs/libclamav.so.6.1.0)
==8206==    by 0x4D8BE8E: llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4D8CA72: llvm::JIT::getPointerToFunction(llvm::Function*) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)

llvm-svn: 99400
2010-03-24 13:50:36 +00:00
Gabor Greif a2fbc0ae1b Finally land the InvokeInst operand reordering.
I have audited all getOperandNo calls now, fixing
hidden assumptions. CallSite related uglyness will
be eliminated successively.

Note this patch has a long and griveous history,
for all the back-and-forths have a look at
CallSite.h's log.

llvm-svn: 99399
2010-03-24 13:21:49 +00:00
Gabor Greif be18ae6781 tighten a type and remove trailing whitespace, no functional changes
llvm-svn: 99398
2010-03-24 11:58:07 +00:00
Gabor Greif 9027ffb918 increase const goodness and remove pointless getUser() calls
llvm-svn: 99395
2010-03-24 10:29:52 +00:00
Gabor Greif 11ff53146f cache result of UI.getOperandNo() instead of calling it twice, it is cheaper this way
llvm-svn: 99394
2010-03-24 10:12:54 +00:00
Duncan Sands 8712da360b Fix comment typo.
llvm-svn: 99392
2010-03-24 09:05:14 +00:00
John McCall 69f7586c5b Walk out of enums when determining effective context.
llvm-svn: 99391
2010-03-24 09:04:37 +00:00
John McCall 1f0479e3d7 Correct that last fixit: if the user wrote
template <> friend void foo(int);
we need to change it to
  friend void foo<>(int);
or else the user won't get the template specialization they obviously want.

llvm-svn: 99390
2010-03-24 08:27:58 +00:00
John McCall 816d75b701 Support friend function specializations.
llvm-svn: 99389
2010-03-24 07:46:06 +00:00
Douglas Gregor d6bc5e6bbc When a declaration of a function is missing an exception specification
that was present in a prior declaration, emit a warning rather than a
hard error (which we did before, and still do with mismatched
exception specifications). Moreover, provide a fix-it hint with the
throw() clause that should be added, e.g.,

t.C:10:7: warning: 'operator new' is missing exception specification
      'throw(std::bad_alloc)'
void *operator new(unsigned long sz)
      ^
                                     throw(std::bad_alloc)

As part of this, disable the warning when we're missing an exception
specification on operator new, operator new[], operator delete, or
operator delete[] when exceptions are turned off (-fno-exceptions).

Fixes PR5957.

llvm-svn: 99388
2010-03-24 07:14:45 +00:00
Anders Carlsson 67fbf9853f Use getNamedGlobal instead of getGlobalVariable. (Fixes self-host).
llvm-svn: 99385
2010-03-24 05:32:05 +00:00
Anders Carlsson 91e18c93c4 Make the license header in smmintrin.h match the other SSE headers.
llvm-svn: 99384
2010-03-24 05:31:31 +00:00
John McCall c62bb64c65 Implement a framework for the delay of arbitrary diagnostics within
templates.  So delay access-control diagnostics when (for example) the target
of a friend declaration is a specific specialization of a template.

I was surprised to find that this was required for an access-controlled selfhost.

llvm-svn: 99383
2010-03-24 05:22:00 +00:00
Douglas Gregor bcf0a47e7a When performing name lookup for the allocation or deallocation
operators, make sure that the implicitly-declared global new and
delete operators are always available. Fixes PR5904.

llvm-svn: 99382
2010-03-24 05:07:21 +00:00
Anders Carlsson b35ea55e2e More vtable work; preparations for moving over to the new vtable layout code (finally).
llvm-svn: 99381
2010-03-24 03:57:14 +00:00
Daniel Dunbar 7c969558d9 MC: Direct all {fragment,section,symbol} address access through the MCAsmLayout object.
llvm-svn: 99380
2010-03-24 03:43:40 +00:00
Evan Cheng cf7be39e24 dbg_value may end a block.
llvm-svn: 99378
2010-03-24 01:50:28 +00:00
Douglas Gregor 5112157958 Each non-local class instantiation is its own local instantiation
scope. Fixes PR6619.

llvm-svn: 99377
2010-03-24 01:33:17 +00:00
Johnny Chen aa9b1c81a7 Mark VMOVDneon and VMOVQ as having the N2RegFrm form to help the disassembler.
llvm-svn: 99376
2010-03-24 01:29:25 +00:00
Chris Lattner 9096bcdeda Switch INC8r to defining its pattern in terms of X86inc_flag
and defining the add pattern with Pat<>, eliminating a use of
parallel.

llvm-svn: 99375
2010-03-24 01:02:12 +00:00
Anders Carlsson 95e0223baf Remove old thunks code.
llvm-svn: 99374
2010-03-24 00:57:54 +00:00
Johnny Chen 9b1f60adec Renamed NVdVmImmFrm and NVdVmVCVTFrm to the more proper N2RegFrm and NVCVTFrm,
respectively, and add some more comment.

llvm-svn: 99373
2010-03-24 00:57:50 +00:00
Dan Gohman b92c8c849b Remove the ConvertActions table and associated code, which is unused.
llvm-svn: 99372
2010-03-24 00:53:38 +00:00
Chris Lattner 918a2c8661 Add a method to get a StringMapEntry from a pointer to the string
data it contains (similar to GetStringMapEntryFromValue).  
Patch by Greg Clayton!

llvm-svn: 99371
2010-03-24 00:53:27 +00:00
Chris Lattner f9c8bec6c5 switch SDTBinaryArithWithFlags to be a multiple-result node as well.
llvm-svn: 99370
2010-03-24 00:49:29 +00:00
Chris Lattner db1ac3cf3e Switch SDTUnaryArithWithFlags to being modeled as a two-result
ISD node.  The only change in the generated isel code are comments
like:

<                 // Src: (X86dec_flag:i16 GR16:i16:$src)
---
>                 // Src: (X86dec_flag:i16:i32 GR16:i16:$src)

because now it knows that X86dec_flag returns both an i16 (for the result)
and an i32 (for EFLAGS) in this case.  Wewt.

llvm-svn: 99369
2010-03-24 00:47:47 +00:00
Douglas Gregor f9f54eab43 Make sure to properly track the anonymous namespace that lives inside
each namespace, even when the outer namespace has multiple
definitions. As part of this, collapsed two pointers worth of storage
(original namespace and inner anonymous namespace) into a single
pointer with a distinguishing bit, since the two are mutually
exclusive, saving a pointer per NamespaceDecl. Fixes PR6620.

llvm-svn: 99368
2010-03-24 00:46:35 +00:00
Anders Carlsson 68fdb871dc Flip the switch and use the new vtable layout code for thunks by default. Add a thunks.cpp test.
llvm-svn: 99367
2010-03-24 00:41:37 +00:00
Chris Lattner 6c2d178957 add plumbing for handling multiple result nodes
in some more places.

llvm-svn: 99366
2010-03-24 00:41:19 +00:00
Anders Carlsson bad991dbfd Add CodeGenFunction::GenerateThunk and implement it.
llvm-svn: 99365
2010-03-24 00:39:18 +00:00
Anders Carlsson 4a3cdf5ac7 Minor cleanup.
llvm-svn: 99364
2010-03-24 00:35:44 +00:00