summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r177543: Add timing of the IR parsing code with a newChandler Carruth2013-03-223-29/+0
| | | | | | | | | | | | | | | -time-ir-parsing flag This breaks the layering of the Support library. We can't add an implementation side to IRReader because it refers directly to entities only accessible as part of the IR, AsmParser, and BitcodeReader libraries. It can only be used in a context where all of those libraries will be available. We'll need to find some other way to get this functionality, and hopefully solve the long-standing layering problem of IRReader.h... llvm-svn: 177695
* Fix buffer read overflow in money_get::do_get(). Found by UBSanMarshall Clow2013-03-221-1/+1
| | | | llvm-svn: 177694
* Fix undefined behavior in syntax_option_type::operator~ and ↵Marshall Clow2013-03-221-2/+2
| | | | | | match_flag_type::operator./a.out Found by UBSan llvm-svn: 177693
* Fix a crash-on-valid where a block capture copy expression wasJohn McCall2013-03-228-5/+60
| | | | | | | | | | | | picking up cleanups from earlier in the statement. Also fix a crash-on-invalid where a reference to an invalid decl from an enclosing scope was causing an expression to fail to build, but only *after* a cleanup was registered from that statement, causing an assertion downstream. The crash-on-valid is rdar://13459289. llvm-svn: 177692
* Change the AppleObjCTrampolineHandler to always run all threads when ↵Jim Ingham2013-03-222-1/+11
| | | | | | | | | | | resolving the target of an ObjC method call. Add a StopOthers method to AppleThreadPlanStepThroughObjCTrampoline, don't rely on the setting in the ThreadPlanToCallFunction, since that gets pushed too late to determine which threads will continue. <rdar://problem/13447638> llvm-svn: 177691
* ubsan: Pass floating-point arguments to the runtime by value if they fit theRichard Smith2013-03-222-2/+36
| | | | | | value argument. If not, be sure we don't accidentally use a dynamic alloca. llvm-svn: 177690
* ubsan: Pass floating-point arguments to the runtime by value if they fit theRichard Smith2013-03-222-9/+38
| | | | | | value argument. llvm-svn: 177689
* Don't try to read the eh_frame section out of a dSYM.Jason Molenda2013-03-221-1/+5
| | | | | | It won't have one and it isn't needed. llvm-svn: 177688
* Fix the invalid opcode for Mips branch instructions in the assemblerJack Carter2013-03-222-16/+18
| | | | | | | | | | | | | | | For mips a branch an 18-bit signed offset (the 16-bit offset field shifted left 2 bits) is added to the address of the instruction following the branch (not the branch itself), in the branch delay slot, to form a PC-relative effective target address. Previously, the code generator did not perform the shift of the immediate branch offset which resulted in wrong instruction opcode. This patch fixes the issue. Contributor: Vladimir Medic llvm-svn: 177687
* <rdar://problem/13479214> Make Clang's <stddef.h> robust against system ↵Douglas Gregor2013-03-225-5/+43
| | | | | | | | | | | | | | headers defining size_t/ptrdiff_t/wchar_t. Clang's <stddef.h> provides definitions for the C standard library types size_t, ptrdiff_t, and wchar_t. However, the system's C standard library headers tend to provide the same typedefs, and the two generally avoid each other using the macros _SIZE_T/_PTRDIFF_T/_WCHAR_T. With modules, however, we need to see *all* of the places where these types are defined, so provide the typedefs (ignoring the macros) when modules are enabled. llvm-svn: 177686
* This patch that enables the Mips assembler to use symbols for offset for ↵Jack Carter2013-03-223-17/+176
| | | | | | | | | | | | instructions This patch uses the generated instruction info tables to identify memory/load store instructions. After successful matching and based on the operand type and size, it generates additional instructions to the output. Contributor: Vladimir Medic llvm-svn: 177685
* Don't forget to link in the C++-specific parts of the ubsan runtime when ↵Richard Smith2013-03-221-1/+2
| | | | | | using the Makefile build system on Darwin. llvm-svn: 177684
* Remove the G8RC_NOX0_and_GPRC_NOR0 PPC register classHal Finkel2013-03-213-7/+12
| | | | | | | | | | | | As Jakob pointed out in his review of r177423, having a shared ZERO register between the 32- and 64-bit register classes causes this odd G8RC_NOX0_and_GPRC_NOR0 class to be created. As recommended, this adds a ZERO8 register which differentiates the 32- and 64-bit zeros. No functionality change intended. llvm-svn: 177683
* Add TableGen ctags(1) emitter and helper script.Sean Silva2013-03-215-1/+561
| | | | | | | | | | | | | | | | | | | | | To use this in conjunction with exuberant ctags to generate a single combined tags file, run tblgen first and then $ ctags --append [...] Since some identifiers have corresponding definitions in C++ code, it can be useful (if using vim) to also use cscope, and :set cscopetagorder=1 so that :tag X will preferentially select the tablegen symbol, while :cscope find g X will always find the C++ symbol. Patch by Kevin Schoedel! (a couple small formatting changes courtesy of clang-format) llvm-svn: 177682
* Always forward 'resume' instructions to the outter landing pad.Bill Wendling2013-03-211-16/+39
| | | | | | | | | | | | | | | | | How did this ever work? Basically, if you have a function that's inlined into the caller, it may not have any 'call' instructions, but any 'resume' instructions it may have should still be forwarded to the outer (caller's) landing pad. This requires that all of the 'landingpad' instructions in the callee have their clauses merged with the caller's outer 'landingpad' instruction (hence the bit of ugly code in the `forwardResume' method). Testcase in a follow commit to the test-suite repository. <rdar://problem/13360379> & PR15555 llvm-svn: 177680
* Fix a register-class comparison bug in PPCCTRLoopsHal Finkel2013-03-214-20/+3
| | | | | | | | | Thanks to Jakob for isolating the underlying problem from the test case in r177423. The original commit had introduced asymmetric copy operations, but these turned out to be a work-around to the real problem (the use of == instead of hasSubClassEq in PPCCTRLoops). llvm-svn: 177679
* [analyzer] scan-build: emit errors on stderr, and exit(1) instead of exit(0).Jordan Rose2013-03-211-19/+27
| | | | | | PR14963 llvm-svn: 177678
* Refactor the filename/directory information in DISubprogram to refer ↵David Blaikie2013-03-215-17/+5
| | | | | | directly to the pair rather than the DIFile. llvm-svn: 177677
* Update debug info test case for more incoming DIBuilder changesDavid Blaikie2013-03-211-2/+2
| | | | | | | Switching the DIFile field in DISubprogram to refer to the raw filename/directory pair instead of a DIFile. llvm-svn: 177676
* Add a query to tell if a landing pad has a catch-all.Bill Wendling2013-03-212-0/+10
| | | | llvm-svn: 177675
* Move the DIFile in DISubprogram to the beginning to be a common prefix along ↵David Blaikie2013-03-2128-101/+101
| | | | | | with other DIScopes llvm-svn: 177674
* Update debug info test case for an incoming change to DIBuilder in LLVMDavid Blaikie2013-03-211-2/+2
| | | | | | (this will produce some transient test failure/skew) llvm-svn: 177673
* Modified the way we report fields of records.Sean Callanan2013-03-213-5/+33
| | | | | | | | | | | | | | | Clang requires them to have complete types, but we were previously only completing them if they were of tag or Objective-C object types. I have implemented a method on the ASTImporter whose job is to complete a type. It handles not only the cases mentioned above, but also array and atomic types. <rdar://problem/13446777> llvm-svn: 177672
* <rdar://problem/13477190> Give the Clang module cache directory some ↵Douglas Gregor2013-03-212-2/+3
| | | | | | | | | | structure, so it's easier to find. We now put the Clang module cache in <system-temp-directory>/org.llvm.clang/ModuleCache. Perhaps some day there will be other caches under <system-temp-directory>/org.llvm.clang>. llvm-svn: 177671
* If we stopped but no threads had a reason for stopping, we should tell the ↵Jim Ingham2013-03-211-1/+16
| | | | | | | | user about it rather than continuing. <rdar://problem/13273125> Astris thread status replies for single-core device confuse lldb; lldb resumes execution on attaching llvm-svn: 177670
* <rdar://problem/13477190> On Darwin, use DARWIN_USER_TEMP_DIR or ↵Douglas Gregor2013-03-211-0/+24
| | | | | | | | | | DARWIN_USER_CACHE_DIR for the system temporary directory. The DARWIN_USER_TEMP_DIR and DARWIN_USER_CACHE_DIR configuration settings are more idiomatic for Darwin than the TMPDIR environment variable. llvm-svn: 177669
* Remove some commented out code.Jim Ingham2013-03-211-8/+0
| | | | llvm-svn: 177668
* This patch enables the Mips .set directive to define aliasesJack Carter2013-03-212-6/+99
| | | | | | | | | | | | | | | | The .set directive in the Mips the assembler can be used to set the value of a symbol to an expression. This changes the symbol's value and type to conform to the expression's. Syntax: .set symbol, expression This patch implements the parsing of the above syntax and enables the parser to use defined symbols when parsing operands. Contributor: Vladimir Medic llvm-svn: 177667
* Implement builtin_{setjmp/longjmp} on PPCHal Finkel2013-03-2110-0/+475
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements SJLJ lowering on PPC, making the Clang functions __builtin_{setjmp/longjmp} functional on PPC platforms. The implementation strategy is similar to that on X86, with the exception that a branch-and-link variant is used to get the right jump address. Credit goes to Bill Schmidt for suggesting the use of the unconditional bcl form (instead of the regular bl instruction) to limit return-address-cache pollution. Benchmarking the speed at -O3 of: static jmp_buf env_sigill; void foo() { __builtin_longjmp(env_sigill,1); } main() { ... for (int i = 0; i < c; ++i) { if (__builtin_setjmp(env_sigill)) { goto done; } else { foo(); } done:; } ... } vs. the same code using the libc setjmp/longjmp functions on a P7 shows that this builtin implementation is ~4x faster with Altivec enabled and ~7.25x faster with Altivec disabled. This comparison is somewhat unfair because the libc version must also save/restore the VSX registers which we don't yet support. llvm-svn: 177666
* Fix indentationDavid Blaikie2013-03-211-3/+3
| | | | llvm-svn: 177665
* Fix Darwin NEON FP and increase coverageRenato Golin2013-03-216-13/+19
| | | | llvm-svn: 177664
* Select correct -std flag for CMake for different versions of gcc.Matt Kopec2013-03-211-1/+10
| | | | llvm-svn: 177663
* Objective-C: Tighten the rules when warningFariborz Jahanian2013-03-214-1/+100
| | | | | | | | | | is issused for on overriding 'readwrite' property which is not auto-synthesized. Buttom line is that if hueristics determine that there will be a user implemented setter, no warning will be issued. // rdar://13388503 llvm-svn: 177662
* Remove unused field in DISubprogramDavid Blaikie2013-03-2190-209/+209
| | | | llvm-svn: 177661
* Generalize debug info tests to be forward compatible with future ↵David Blaikie2013-03-213-3/+3
| | | | | | DISubprogram changes llvm-svn: 177659
* This ugly regex is required because on Windows, the paths come out as \\ ↵Aaron Ballman2013-03-211-1/+1
| | | | | | delimited instead of / delimited. Fixes a test breakage since r176894. llvm-svn: 177658
* Remove unused variable.Benjamin Kramer2013-03-211-3/+0
| | | | llvm-svn: 177657
* Avoid warnings from compilers that think you can drop off the end of a fully ↵Benjamin Kramer2013-03-211-0/+2
| | | | | | covered switch. llvm-svn: 177656
* Delayed template parsing is not supported by the AST serialization system ↵Aaron Ballman2013-03-211-1/+1
| | | | | | yet, so turning it off. This fixes a test breakage caused by r177336. llvm-svn: 177655
* Add support for spilling VRSAVE on PPCHal Finkel2013-03-215-1/+124
| | | | | | | | | | Although there is only one Altivec VRSAVE register, it is a member of a register class, and we need the ability to spill it. Because this register is normally callee-preserved and handled by special code this has never before been necessary. However, this capability will be required by a forthcoming commit adding SjLj support. llvm-svn: 177654
* Correct PPC FRAMEADDR lowering using a pseudo-registerHal Finkel2013-03-216-9/+97
| | | | | | | | | | | | | | | | The old code used to lower FRAMEADDR tried to replicate the logic in the real frame-lowering code that determines whether or not the frame pointer (r31) will be used. When it seemed as through the frame pointer would not be used, the stack pointer (r1) was used instead. Unfortunately, because the stack size is not yet known, this does not work. Instead, this change introduces new always-reserved pseudo-registers (FP and FP8) that are replaced during prologue insertion with the real frame-pointer register (either r1 or r31). It is important that this intrinsic always return a valid frame address because it is used by Clang to store the frame address as part of code generation for __builtin_setjmp. llvm-svn: 177653
* Avoid NEON SP-FP unless unsafe-math or DarwinRenato Golin2013-03-2112-20/+143
| | | | | | | | | | NEON is not IEEE 754 compliant, so we should avoid lowering single-precision floating point operations with NEON unless unsafe-math is turned on. The equivalent VFP instructions are IEEE 754 compliant, but in some cores they're much slower, so some archs/OSs might still request it to be on by default, such as Swift and Darwin. llvm-svn: 177651
* Update some EH tests that were violating the new EH model.Bill Wendling2013-03-213-6/+16
| | | | | | | The landingpad instruction needs to be the first non-PHI instruction in the unwind destination block. llvm-svn: 177650
* [analyzer] Print return values from debug.DumpCalls checker.Jordan Rose2013-03-211-1/+23
| | | | | | Debug utility only, no functionality change. llvm-svn: 177649
* tsan: better reporting of thread leaksDmitry Vyukov2013-03-218-11/+76
| | | | | | | 1. do not report running threads as leaks 2. aggregate leaked threads by creation stack llvm-svn: 177647
* The outline of the stepping perf test case, doesn't do anything yet.Jim Ingham2013-03-213-17/+313
| | | | llvm-svn: 177646
* Add failing test caseTobias Grosser2013-03-211-0/+22
| | | | llvm-svn: 177645
* Do not canonicalize indvars with scev based codegenTobias Grosser2013-03-211-1/+4
| | | | | | | Scev code generation can now handle scops with non canonical induction variables. Hence there is no need to introduce canonical ones any more. llvm-svn: 177644
* Remove last uses of canoncial induction variable when scev code generatingTobias Grosser2013-03-2112-13/+68
| | | | | | | | We now detect scops without a canonical induction variable and can generate a polyhedral representation for them. There was no modification necessary to code generate these scops. llvm-svn: 177643
* TempScop: Make assert more descriptiveTobias Grosser2013-03-211-1/+1
| | | | llvm-svn: 177642
OpenPOWER on IntegriCloud