summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Hexagon] PC-relative offsets are relative to packet start rather than the ↵Colin LeMahieu2015-06-152-3/+48
| | | | | | offset of the relocation. Set relocation addend and check it's correct in the ELF. llvm-svn: 239769
* Revert "[ASan tests] Try to fix Windows buildbots due to r239754"Filipe Cabecinhas2015-06-155-5/+5
| | | | | | This reverts commit r239764 and the TestCases/Windows part of r239754. llvm-svn: 239768
* [X86][SSE] Added tests for vector i8/i16 to f32/f64 conversionsSimon Pilgrim2015-06-151-55/+562
| | | | llvm-svn: 239767
* Fix a bug where passing a value of the type "A B" to settings set ↵Enrico Granata2015-06-151-0/+6
| | | | | | | | target.env-vars would cause LLDB to crash Fixes rdar://problem/21241817 llvm-svn: 239766
* Fix submodule test to pass on content addressable filesystems where inodes ↵Reid Kleckner2015-06-152-0/+2
| | | | | | would collide llvm-svn: 239765
* [ASan tests] Try to fix Windows buildbots due to r239754Filipe Cabecinhas2015-06-155-5/+5
| | | | llvm-svn: 239764
* Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne2015-06-1517-0/+515
| | | | | | | | | | | | | | | | | | | compiler-rt runtime support library This patch adds runtime support for the Safe Stack protection to compiler-rt (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack). This patch is our implementation of the safe stack on top of compiler-rt. The patch adds basic runtime support for the safe stack to compiler-rt that manages unsafe stack allocation/deallocation for each thread. Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself. Differential Revision: http://reviews.llvm.org/D6096 llvm-svn: 239763
* Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne2015-06-1514-1/+223
| | | | | | | | | | | | | | | | | | | | | | | | | Clang command line option and function attribute This patch adds the -fsanitize=safe-stack command line argument for clang, which enables the Safe Stack protection (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack). This patch is our implementation of the safe stack on top of Clang. The patches make the following changes: - Add -fsanitize=safe-stack and -fno-sanitize=safe-stack options to clang to control safe stack usage (the safe stack is disabled by default). - Add __attribute__((no_sanitize("safe-stack"))) attribute to clang that can be used to disable the safe stack for individual functions even when enabled globally. Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself. Differential Revision: http://reviews.llvm.org/D6095 llvm-svn: 239762
* Protection against stack-based memory corruption errors using SafeStackPeter Collingbourne2015-06-1548-4/+1417
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the safe stack instrumentation pass to LLVM, which separates the program stack into a safe stack, which stores return addresses, register spills, and local variables that are statically verified to be accessed in a safe way, and the unsafe stack, which stores everything else. Such separation makes it much harder for an attacker to corrupt objects on the safe stack, including function pointers stored in spilled registers and return addresses. You can find more information about the safe stack, as well as other parts of or control-flow hijack protection technique in our OSDI paper on code-pointer integrity (http://dslab.epfl.ch/pubs/cpi.pdf) and our project website (http://levee.epfl.ch). The overhead of our implementation of the safe stack is very close to zero (0.01% on the Phoronix benchmarks). This is lower than the overhead of stack cookies, which are supported by LLVM and are commonly used today, yet the security guarantees of the safe stack are strictly stronger than stack cookies. In some cases, the safe stack improves performance due to better cache locality. Our current implementation of the safe stack is stable and robust, we used it to recompile multiple projects on Linux including Chromium, and we also recompiled the entire FreeBSD user-space system and more than 100 packages. We ran unit tests on the FreeBSD system and many of the packages and observed no errors caused by the safe stack. The safe stack is also fully binary compatible with non-instrumented code and can be applied to parts of a program selectively. This patch is our implementation of the safe stack on top of LLVM. The patches make the following changes: - Add the safestack function attribute, similar to the ssp, sspstrong and sspreq attributes. - Add the SafeStack instrumentation pass that applies the safe stack to all functions that have the safestack attribute. This pass moves all unsafe local variables to the unsafe stack with a separate stack pointer, whereas all safe variables remain on the regular stack that is managed by LLVM as usual. - Invoke the pass as the last stage before code generation (at the same time the existing cookie-based stack protector pass is invoked). - Add unit tests for the safe stack. Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself. Differential Revision: http://reviews.llvm.org/D6094 llvm-svn: 239761
* Don't indent inside a namespace. NFC.Rafael Espindola2015-06-151-21/+19
| | | | llvm-svn: 239760
* Replace @ with the more common \. NFC.Rafael Espindola2015-06-151-6/+6
| | | | llvm-svn: 239759
* parser: improve diagnostics for MS attributesSaleem Abdulrasool2015-06-152-6/+11
| | | | | | | | Switch to using BalancedDelimiterTracker to get better diagnostics for unbalanced delimiters. This still does not handle any of the attributes, simply improves the parsing. llvm-svn: 239758
* Wildcard out some SSA value names from the ACLE intrinsic test caseReid Kleckner2015-06-151-6/+6
| | | | llvm-svn: 239757
* Don't repeat names in comments and start functions with a lower case letter.Rafael Espindola2015-06-151-537/+527
| | | | llvm-svn: 239756
* [Sparc] Make soft-float emit an error.James Y Knight2015-06-152-49/+21
| | | | | | | | | | | | LLVM does not and has not ever supported a soft-float ABI mode on Sparc, so don't pretend that it does. Also switch the default from "soft-float" -- which was actually hard-float because soft-float is unimplemented -- to hard-float. Differential Revision: http://reviews.llvm.org/D10457 llvm-svn: 239755
* [ASan] Test churn for setting ASAN_OPTIONS=symbolize_vs_style=falseFilipe Cabecinhas2015-06-15132-336/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit adds symbolize_vs_style=false to every instance of ASAN_OPTIONS in the asan tests and sets ASAN_OPTIONS=symbolize_vs_style=false in lit, for tests which don't set it. This way we don't need to make the tests be able to deal with both symbolize styles. This is the first patch in the series. I will eventually submit for the other sanitizers too. We need this change (or another way to deal with the different outputs) in order to be able to default to symbolize_vs_style=true on some platforms. Adding to this change, I'm also adding "env " before any command line which sets environment variables. That way the test works on other host shells, like we have if the host is running Windows. Reviewers: samsonov, kcc, rnk Subscribers: tberghammer, llvm-commits Differential Revision: http://reviews.llvm.org/D10294 llvm-svn: 239754
* MIR Serialization: Connect the machine function analysis pass to the MIR parser.Alex Lorenz2015-06-1522-104/+311
| | | | | | | | | | | | | | | | | | | | | This commit connects the machine function analysis pass (which creates machine functions) to the MIR parser, which will initialize the machine functions with the state from the MIR file and reconstruct the machine IR. This commit introduces a new interface called 'MachineFunctionInitializer', which can be used to provide custom initialization for the machine functions. This commit also introduces a new diagnostic class called 'DiagnosticInfoMIRParser' which is used for MIR parsing errors. This commit modifies the default diagnostic handling in LLVMContext - now the the diagnostics are printed directly into llvm::errs() so that the MIR parsing errors can be printed with colours. Reviewers: Justin Bogner Differential Revision: http://reviews.llvm.org/D9928 llvm-svn: 239753
* Found an issue that was causing types to be completed much more often than ↵Greg Clayton2015-06-151-6/+17
| | | | | | | | | | they needed to be. The problem is for lldb_private::Type instances that have encoding types (pointer/reference/const/volatile/restrict/typedef to type with user ID 0x123). If they started out with m_flags.clang_type_resolve_state being set to eResolveStateUnresolved (0), then when we would call Type::ResolveClangType(eResolveStateForward) we would complete the full type due to logic errors in the code. We now only complete the type if clang_type_resolve_state is eResolveStateLayout or eResolveStateFull and we correctly upgrade the type's current completion state to eResolveStateForward after we make a forward delcaration to the pointer/reference/const/volatile/restrict/typedef type instead of leaving it set to eResolveStateUnresolved. llvm-svn: 239752
* Remove duplicate conditional in if-stmt.Eric Christopher2015-06-151-2/+1
| | | | | | Fixes PR23839. llvm-svn: 239751
* [modules] Better support for redefinitions of an entity from the same module.Richard Smith2015-06-1510-47/+73
| | | | | | | Support this across module save/reload and extend the 'missing import' diagnostics with a list of providing modules. llvm-svn: 239750
* Cleanup the constructor of BitcodeReader. NFC.Rafael Espindola2015-06-151-30/+28
| | | | | | | | | Use the same argument names as the members. Use default member initializes. Extracted from a patch by Karl Schimpf. llvm-svn: 239749
* Add "REQUIRES: asserts" to test case that uses -debug-onlySanjoy Das2015-06-151-0/+1
| | | | llvm-svn: 239748
* Unbreak docs build from r239740.Sanjoy Das2015-06-151-0/+4
| | | | | | Add FaultMaps.rst to toctree. llvm-svn: 239747
* Unbreak the build from r239740.Sanjoy Das2015-06-153-12/+12
| | | | | | Do not re-use an enum name as a field name. Some bots don't like this. llvm-svn: 239746
* COFF: Simplify SymbolBody::compare(SymbolBody *Other).Rui Ueyama2015-06-152-46/+43
| | | | | | | | We are currently handling all combinations of SymbolBody types directly. This patch is to flip this and Other if Other->kind() < this->kind() to reduce number of combinations. No functionality change intended. llvm-svn: 239745
* [Hexagon] Moving pass declarations out of header and in to implementation ↵Colin LeMahieu2015-06-1513-52/+53
| | | | | | files. Removing unused function getSubtargetInfo from HexagonMCCodeEmitter.cpp Removing deletion of copy construction and assignment operator since parent already deletes it. llvm-svn: 239744
* [CodeGen] Add a pass to fold null checks into nearby memory operations.Sanjoy Das2015-06-158-0/+445
| | | | | | | | | | | | | | | | | | | | | Summary: This change adds an "ImplicitNullChecks" target dependent pass. This pass folds null checks into memory operation using the FAULTING_LOAD pseudo-op introduced in previous patches. Depends on D10197 Depends on D10199 Depends on D10200 Reviewers: reames, rnk, pgavlin, JosephTremoulet, atrick Reviewed By: atrick Subscribers: ab, JosephTremoulet, llvm-commits Differential Revision: http://reviews.llvm.org/D10201 llvm-svn: 239743
* [TargetInstrInfo] Add new hook: AnalyzeBranchPredicate.Sanjoy Das2015-06-153-5/+140
| | | | | | | | | | | | | | | | | | | Summary: NFC: no one uses AnalyzeBranchPredicate yet. Add TargetInstrInfo::AnalyzeBranchPredicate and implement for x86. A later change adding support for page-fault based implicit null checks depends on this. Reviewers: reames, ab, atrick Reviewed By: atrick Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10200 llvm-svn: 239742
* [TargetInstrInfo] Rename getLdStBaseRegImmOfs and implement for x86.Sanjoy Das2015-06-159-28/+63
| | | | | | | | | | | | | | | | | | | | | | | Summary: TargetInstrInfo::getLdStBaseRegImmOfs to TargetInstrInfo::getMemOpBaseRegImmOfs and implement for x86. The implementation only handles a few easy cases now and will be made more sophisticated in the future. This is NFCI: the only user of `getLdStBaseRegImmOfs` (now `getmemOpBaseRegImmOfs`) is `LoadClusterMotion` and `LoadClusterMotion` is disabled for x86. Reviewers: reames, ab, MatzeB, atrick Reviewed By: MatzeB, atrick Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10199 llvm-svn: 239741
* [CodeGen] Introduce a FAULTING_LOAD_OP pseudo-op.Sanjoy Das2015-06-1512-3/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This instruction encodes a loading operation that may fault, and a label to branch to if the load page-faults. The locations of potentially faulting loads and their "handler" destinations are recorded in a FaultMap section, meant to be consumed by LLVM's clients. Nothing generates FAULTING_LOAD_OP instructions yet, but they will be used in a future change. The documentation (FaultMaps.rst) needs improvement and I will update this diff with a more expanded version shortly. Depends on D10196 Reviewers: rnk, reames, AndyAyers, ab, atrick, pgavlin Reviewed By: atrick, pgavlin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10197 llvm-svn: 239740
* [NFC] Extract X86MCInstLower::LowerMachineOperand.Sanjoy Das2015-06-151-38/+37
| | | | | | | | | | | | | | Summary: Refactoring-only change that will be used later. Reviewers: reames, atrick Reviewed By: atrick Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10196 llvm-svn: 239739
* COFF: Fix .reloc section attributes.Rui Ueyama2015-06-152-4/+5
| | | | llvm-svn: 239738
* This patch implements clang support for the ACLE special register intrinsicsLuke Cheeseman2015-06-1512-1/+578
| | | | | | | | | | | | | in section 10.1, __arm_{w,r}sr{,p,64}. This includes arm_acle.h definitions with builtins and codegen to support these, the intrinsics are implemented by generating read/write_register calls which get appropriately lowered in the backend based on the register string provided. SemaChecking is also implemented to fault invalid parameters. Differential Revision: http://reviews.llvm.org/D9697 llvm-svn: 239737
* De-duplicate common expression, NFC.Yaron Keren2015-06-151-3/+3
| | | | llvm-svn: 239736
* COFF: Update README.Rui Ueyama2015-06-151-11/+11
| | | | llvm-svn: 239734
* Rangify several for loops, NFC.Yaron Keren2015-06-151-17/+15
| | | | llvm-svn: 239733
* On behalf of Alexandros Lamprineas:Evgeny Astigeevich2015-06-152-0/+7
| | | | | | | | | | | | | | | | LLVM targeting aarch64 doesn't correctly produce aligned accesses for non-aligned data at -O0/fast-isel (-mno-unaligned-access). The root cause seems to be in fast-isel not producing unaligned access correctly for -mno-unaligned-access. The patch just aborts fast-isel for loads and stores when -mno-unaligned-access is present. The regression test is updated to check this new test case (-mno-unaligned-access together with fast-isel). Differential Revision: http://reviews.llvm.org/D10360 llvm-svn: 239732
* [LinkerTest] Use LLVMDisposeMessage to free error string.Benjamin Kramer2015-06-151-1/+1
| | | | | | | LLVMDisposeMessage is just a thing wrapper around free at the moment, but it's the proper API to use here. llvm-svn: 239731
* clang-format: NFC. Move testing of selective formatting to a separate file.Daniel Jasper2015-06-153-402/+448
| | | | | | | This is a first step for splitting the huge FormatTest.cpp into separate files to make it easier to find specific tests. llvm-svn: 239730
* Avoid a "always true" warning from gcc.Rafael Espindola2015-06-151-1/+3
| | | | llvm-svn: 239729
* Fix spelling in comment.Douglas Katzman2015-06-151-1/+1
| | | | llvm-svn: 239727
* gold-plugin: save the .o when given -save-temps.Rafael Espindola2015-06-152-3/+11
| | | | | | | The plugin now save the bitcode before and after optimizations and the .o that is passed to the linker. llvm-svn: 239726
* Orthography: substracting -> subtractingMichael Kruse2015-06-151-1/+1
| | | | | | This is a test commit for being granted commit-after-approval access. llvm-svn: 239725
* Revert r239721 - Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-158-32/+20
| | | | | | | | InitMCObjectFileInfo. NFC. It appears to cause sparc-little-endian.s to assert on Windows and Darwin. llvm-svn: 239724
* [LinkerScript] Allow destruction of PHDRDenis Protivensky2015-06-151-1/+0
| | | | | | This is needed for static variable defined in sources. llvm-svn: 239723
* clang-format: [JS] Tweak behavior for multiline array initializer parametersDaniel Jasper2015-06-152-1/+9
| | | | | | | | | | | | | | | | | | | | | Before: var someVariable = SomeFuntion(aaaa, [ aaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccc ], aaaa); After: var someVariable = SomeFuntion(aaaa, [ aaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccc ], aaaa); llvm-svn: 239722
* Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.Daniel Sanders2015-06-158-20/+32
| | | | | | | | | | | | | | | | | | | | | Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar trivial patches. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10366 llvm-svn: 239721
* [MachineSink] Improve runtime performance. NFC.Arnaud A. de Grandmaison2015-06-151-35/+59
| | | | | | | | | | | | This patch fixes a compilation time issue, when MachineSink faces PHIs with a huge number of operands. This can happen for example in goto table based interpreters, where some basic blocks can have several of those PHIs, each one with several hundreds operands. MachineSink was spending a significant time re-building and re-sorting the list of successors of the current MachineBasicBlock. The computing and sorting of the current MachineBasicBlock successors is now cached. llvm-svn: 239720
* [LinkerScript] Add matching of output sections to segmentsDenis Protivensky2015-06-1514-5/+317
| | | | | | | | | | | Add method to query segments for specified output section name. Return error if the section is assigned to unknown segment. Check matching of sections to segments during layout on the subject of correctness. NOTE: no actual functionality of using custom segments is implemented. Differential Revision: http://reviews.llvm.org/D10359 llvm-svn: 239719
* [ValueTracking] do not overwrite analysis results already computedJingyue Wu2015-06-153-146/+192
| | | | | | | | | | | | | | | | | | Summary: ValueTracking used to overwrite the analysis results computed from assumes and dominating conditions. This patch fixes this issue. Test Plan: test/Analysis/ValueTracking/assume.ll Reviewers: hfinkel, majnemer Reviewed By: majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10283 llvm-svn: 239718
OpenPOWER on IntegriCloud