summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [TSan] Add the WTFAnnotateBenignRaceSized implementation and a test forAlexander Potapenko2013-04-022-0/+43
| | | | | | WTFAnnotateBenignRaceSized and AnnotateBenignRaceSized. llvm-svn: 178534
* Use a worklist to avoid a sneaky iterator invalidation.Bill Wendling2013-04-022-3/+22
| | | | | | | | | | | | | The iterator could be invalidated when it's recursively deleting a whole bunch of constant expressions in a constant initializer. Note: This was only reproducible if `opt' was run on a `.bc' file. If `opt' was run on a `.ll' file, it wouldn't crash. This is why the test first pushes the `.ll' file through `llvm-as' before feeding it to `opt'. PR15440 llvm-svn: 178531
* ScopDetection: Use isTopLevelRegionTobias Grosser2013-04-021-1/+1
| | | | | Contributed-by: Star Tan <tanmx_star@yeah.net> llvm-svn: 178530
* [analyzer] Moving cplusplus.NewDelete to alpha.* for now.Anton Yartsev2013-04-028-15/+11
| | | | llvm-svn: 178529
* Add 64-bit load and store instructions.Jakob Stoklund Olesen2013-04-022-0/+126
| | | | | | There is only a few new instructions, the rest is handled with patterns. llvm-svn: 178528
* Basic 64-bit ALU operations.Jakob Stoklund Olesen2013-04-022-0/+59
| | | | | | | SPARC v9 extends all ALU instructions to 64 bits, so we simply need to add patterns to use them for both i32 and i64 values. llvm-svn: 178527
* Materialize 64-bit immediates.Jakob Stoklund Olesen2013-04-022-0/+134
| | | | | | | The last resort pattern produces 6 instructions, and there are still opportunities for materializing some immediates in fewer instructions. llvm-svn: 178526
* Add 64-bit shift instructions.Jakob Stoklund Olesen2013-04-024-0/+100
| | | | | | | | | | | SPARC v9 defines new 64-bit shift instructions. The 32-bit shift right instructions are still usable as zero and sign extensions. This adds new F3_Sr and F3_Si instruction formats that probably should be used for the 32-bit shifts as well. They don't really encode an simm13 field. llvm-svn: 178525
* Add predicates for distinguishing 32-bit and 64-bit modes.Jakob Stoklund Olesen2013-04-021-0/+6
| | | | | | | | | | | The 'sparc' architecture produces 32-bit code while 'sparcv9' produces 64-bit code. It is also possible to run 32-bit code using SPARC v9 instructions with: llc -march=sparc -mattr=+v9 llvm-svn: 178524
* Add support for 64-bit calling convention.Jakob Stoklund Olesen2013-04-025-12/+123
| | | | | | | | | | | | This is far from complete, but it is enough to make it possible to write test cases using i64 arguments. Missing features: - Floating point arguments. - Receiving arguments on the stack. - Calls. llvm-svn: 178523
* Add an I64Regs register class for 64-bit registers.Jakob Stoklund Olesen2013-04-026-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | We are going to use the same registers for 32-bit and 64-bit values, but in two different register classes. The I64Regs register class has a larger spill size and alignment. The addition of an i64 register class confuses TableGen's type inference, so it is necessary to clarify the type of some immediates and the G0 register. In 64-bit mode, pointers are i64 and should use the I64Regs register class. Implement getPointerRegClass() to dynamically provide the pointer register class depending on the subtarget. Use ptr_rc and iPTR for memory operands. Finally, add the i64 type to the IntRegs register class. This register class is not used to hold i64 values, I64Regs is for that. The type is required to appease TableGen's type checking in output patterns like this: def : Pat<(add i64:$a, i64:$b), (ADDrr $a, $b)>; SPARC v9 uses the same ADDrr instruction for i32 and i64 additions, and TableGen doesn't know to check the type of register sub-classes. llvm-svn: 178522
* Fix typo in PPCISelLoweringHal Finkel2013-04-021-1/+1
| | | | | | Thanks to Bill Schmidt for finding this in review of r178480. llvm-svn: 178521
* Add -Wstatic-local-in-inline, which warns about using a static localJohn McCall2013-04-026-7/+79
| | | | | | | | | | | | | | variable in a C99 inline (but not static-inline or extern-inline) function definition. The standard doesn't actually say that this doesn't apply to "extern inline" definitions, but that seems like a useful extension, and it at least doesn't have the obvious flaw that a static mutable variable in an externally-available definition does. rdar://13535367 llvm-svn: 178520
* The divide unit is not pipeline, but it is still buffered.Andrew Trick2013-04-022-4/+4
| | | | | | | | | | | | | | | | | | | | Buffered means a later divide may be executed out-of-order while a prior divide is sitting (buffered) in a reservation station. You can tell it's not pipelined, because operations that use it reserve it for more than one cycle: def : WriteRes<WriteIDiv, [HWPort0, HWDivider]> { let Latency = 25; let ResourceCycles = [1, 10]; } We don't currently distinguish between an unpipeline operation and one that is split into multiple micro-ops requiring the same unit. Except that the later may have NumMicroOps > 1 if they also consume issue/dispatch resources. llvm-svn: 178519
* [analyzer] Teach invalidateRegions that regions within LazyCompoundVal need ↵Anna Zaks2013-04-028-76/+201
| | | | | | | | | | | | to be invalidated Refactor invalidateRegions to take SVals instead of Regions as input and teach RegionStore about processing LazyCompoundVal as a top-level “escaping” value. This addresses several false positives that get triggered by the NewDelete checker, but the underlying issue is reproducible with other checkers as well (for example, MallocChecker). llvm-svn: 178518
* un-break remaining gdb buildbot testcases.Adrian Prantl2013-04-022-0/+51
| | | | | | | Make sure we do not generate line info for debugging-related frame setup. Follow-up to r178361 / rdar://problem/12767564 llvm-svn: 178517
* [analyzer] For now, don't inline [cd]tors of C++ containers.Jordan Rose2013-04-027-8/+321
| | | | | | | | | | | | | | | | | | | | | This is a heuristic to make up for the fact that the analyzer doesn't model C++ containers very well. One example is modeling that 'std::distance(I, E) == 0' implies 'I == E'. In the future, it would be nice to model this explicitly, but for now it just results in a lot of false positives. The actual heuristic checks if the base type has a member named 'begin' or 'iterator'. If so, we treat the constructors and destructors of that type as opaque, rather than inlining them. This is intended to drastically reduce the number of false positives reported with experimental destructor support turned on. We can tweak the heuristic in the future, but we'd rather err on the side of false negatives for now. <rdar://problem/13497258> llvm-svn: 178516
* [analyzer] Cache whether a function is generally inlineable.Jordan Rose2013-04-022-67/+129
| | | | | | | | | | | | | | | Certain properties of a function can determine ahead of time whether or not the function is inlineable, such as its kind, its signature, or its location. We can cache this value in the FunctionSummaries map to avoid rechecking these static properties for every call. Note that the analyzer may still decide not to inline a specific call to a function because of the particular dynamic properties of the call along the current path. No intended functionality change. llvm-svn: 178515
* [analyzer] Use inline storage in the FunctionSummary DenseMap.Jordan Rose2013-04-022-36/+28
| | | | | | | | | | | | | The summaries lasted for the lifetime of the map anyway; no reason to include an extra allocation. Also, use SmallBitVector instead of BitVector to track the visited basic blocks -- most functions will have less than 64 basic blocks -- and use bitfields for the other fields to reduce the size of the structure. No functionality change. llvm-svn: 178514
* [analyzer] Allow suppressing diagnostics reported within the 'std' namespaceJordan Rose2013-04-025-7/+126
| | | | | | | | | | | | This is controlled by the 'suppress-c++-stdlib' analyzer-config flag. It is currently off by default. This is more suppression than we'd like to do, since obviously there can be user-caused issues within 'std', but it gives us the option to wield a large hammer to suppress false positives the user likely can't work around. llvm-svn: 178513
* Remove some unused code.Jim Ingham2013-04-021-13/+0
| | | | llvm-svn: 178512
* unindent the file to follow coding standards, change class doc commentChris Lattner2013-04-011-117/+117
| | | | | | to be correct. No functionality or behavior change. llvm-svn: 178511
* Fix typo in testMatt Beaumont-Gay2013-04-011-1/+1
| | | | llvm-svn: 178510
* Enabled blocks support in the expression parser.Sean Callanan2013-04-011-0/+1
| | | | | | | | | | | Note: although it is now possible to declare blocks and call them inside the same expression, we do not generate correct block descriptors so these blocks cannot be passed to functions like dispatch_async. <rdar://problem/12578656> llvm-svn: 178509
* Target/R600: Fix CMake build to add missing files.NAKAMURA Takumi2013-04-011-0/+3
| | | | llvm-svn: 178508
* Use the ASYContext::getTypeSizeInChars API to cleanup some ugliness, per JohnChad Rosier2013-04-011-5/+3
| | | | | | and Jordan's suggestion. No functional change intendend. llvm-svn: 178507
* Mips direct object exception handling regressionJack Carter2013-04-014-3/+128
| | | | | | | | | | | | | | | | | Revision 177141 caused a regression in all but mips64 little endian. That is because none of the other Mips targets had test cases checking the contents of the .eh_frame section. This patch fixes both the llvm code and adds an assembler test case to include the current 4 flavors. The test cases unfortunately rely on llvm-objdump. A preferable method would be to use a pretty printer output such as what readelf -wf <elf_file> would give. I also changed the name of the test case to correct a typo. llvm-svn: 178506
* R600: Add support for native control flowVincent Lejeune2013-04-017-7/+397
| | | | llvm-svn: 178505
* R600/SI: Share code recording ShaderTypeAttribute between generationsVincent Lejeune2013-04-016-28/+60
| | | | llvm-svn: 178504
* R600: Emit CF_ALU and use true kcache register.Vincent Lejeune2013-04-017-11/+398
| | | | llvm-svn: 178503
* PR15633: Note that we are EnteringContext when parsing the nested nameRichard Smith2013-04-015-2/+21
| | | | | | | specifier for an enumeration. Also fix a crash-on-invalid if a non-dependent name specifier is used to declare an enum template. llvm-svn: 178502
* [arcmt] Copy the diagnostics so we don't have to worry about invaliding ↵Argyrios Kyrtzidis2013-04-011-3/+9
| | | | | | | | iterators from the diagnostic list. Should fix http://llvm.org/PR15500 llvm-svn: 178500
* R600: Handle -mcpu option v3Tom Stellard2013-04-013-0/+79
| | | | | | | | | | v2: - Add a test case v3: - Use the -### clang option in the tests llvm-svn: 178499
* R600: Add missing Southern Islands GPU to setCPU() functionTom Stellard2013-04-011-1/+1
| | | | llvm-svn: 178498
* Revert r178079, it caused PR15637.Nico Weber2013-04-013-16/+41
| | | | | | Also add a test for PR15637. llvm-svn: 178497
* Don't eagerly deserialize every templated function (and every static dataRichard Smith2013-04-013-2/+20
| | | | | | member inside a class template) when loading a PCH file or module. llvm-svn: 178496
* [ELF][Hexagon] fix few relocations and add testShankar Easwaran2013-04-015-34/+57
| | | | llvm-svn: 178495
* Refactor Usenullptr matcher to avoid duplicationAriel J. Bernal2013-04-016-96/+91
| | | | | | | | | | | Previously UseNullptr matched separately implicit and explicit casts to nullptr, now it matches casts that either are implict casts to nullptr or have an implicit cast to nullptr within. Also fixes PR15572 since the same macro replacement logic is applied to implicit and explicit casts. llvm-svn: 178494
* Fix bug in ProcessPOSIX::IsAlive() exposed by r178324Daniel Malea2013-04-011-1/+4
| | | | | | | - process in 'unloaded' state was (incorrectly) considered to be alive by POSIX plugin - above caused a regression in TestProcessLaunch cases llvm-svn: 178493
* Fix top-comment header and some indentationEli Bendersky2013-04-012-3/+3
| | | | llvm-svn: 178492
* Avoid hang in attach-by-name test caseDaniel Malea2013-04-012-5/+8
| | | | | | | - Check that process attach succeeded before attempting to WaitForProcessToStop (observed to cause hangs on Linux) - Update comment in TestHelloWorld case -- attaching by name still broken llvm-svn: 178491
* * Attempt to un-break gdb buildbot by emitting a lexical block end onlyAdrian Prantl2013-04-012-7/+65
| | | | | | | | when we actually end a lexical block. * Added new test for line table / block cleanup. * Follow-up to r177819 / rdar://problem/13115369 llvm-svn: 178490
* Fix a bad assert in PPCTargetLoweringHal Finkel2013-04-012-2/+3
| | | | llvm-svn: 178489
* Only merge down a variable type if the previous declaration wasJohn McCall2013-04-014-11/+97
| | | | | | | | | visible. There's a lot of potential badness in how we're modelling these things, but getting this much correct is reasonably easy. rdar://13535367 llvm-svn: 178488
* Adding parenType() and innerType() AST MatchersEdwin Vane2013-04-013-0/+77
| | | | | | Updated docs and tests. llvm-svn: 178487
* Add triple to test/CodeGen/PowerPC/stfiwx-2Hal Finkel2013-04-011-1/+1
| | | | llvm-svn: 178486
* Improve loop convert's variable aliasingEdwin Vane2013-04-012-8/+54
| | | | | | | | | | | | | | | Loop convert's variable name aliasing may cause issues if the variable is declared as a value (copy). The converted loop will declare the variable as a reference which may inadvertently cause modifications to the container if it were used and modified as a temporary copy. This is fixed by preserving the reference or value qualifiers of the aliased variable. That is, if the variable was declared as a value the loop variable will also be declared as a value and similarly for references. Fixes: PR15600 Author: Jack Yang <jack.yang@intel.com> llvm-svn: 178485
* Correct assertion conditionShuxin Yang2013-04-012-1/+16
| | | | llvm-svn: 178484
* Merge load/store sequences with adresses: base + index + offsetArnold Schwaighofer2013-04-012-25/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would also like to merge sequences that involve a variable index like in the example below. int index = *idx++ int i0 = c[index+0]; int i1 = c[index+1]; b[0] = i0; b[1] = i1; By extending the parsing of the base pointer to handle dags that contain a base, index, and offset we can handle examples like the one above. The dag for the code above will look something like: (load (i64 add (i64 copyfromreg %c) (i64 signextend (i8 load %index)))) (load (i64 add (i64 copyfromreg %c) (i64 signextend (i32 add (i32 signextend (i8 load %index)) (i32 1))))) The code that parses the tree ignores the intermediate sign extensions. However, if there is a sign extension it needs to be on all indexes. (load (i64 add (i64 copyfromreg %c) (i64 signextend (add (i8 load %index) (i8 1)))) vs (load (i64 add (i64 copyfromreg %c) (i64 signextend (i32 add (i32 signextend (i8 load %index)) (i32 1))))) radar://13536387 llvm-svn: 178483
* Integrating option parsing in TestCase for added convenienceEnrico Granata2013-04-016-6/+87
| | | | | | | | | To hook it up to individual test cases: - define GetLongOptions() in your test case class to return something other than NULL (hopefully an array of options :-) - implement ParseOption() to check for the short option char and do the right thing - return true at the end if you want more options to come your way or false if you don’t - make sure that your Setup() call takes int& and char**& so that optind post-processing can happen - and call TestCase::Setup from your setup llvm-svn: 178482
OpenPOWER on IntegriCloud