Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Implement stack protectors for structures with character arrays in them. | Bill Wendling | 2012-08-17 | 1 | -15/+40 | |
| | | | | | | <rdar://problem/10545247> llvm-svn: 162131 | |||||
* | Whitespace cleanup. | Bill Wendling | 2012-08-13 | 1 | -7/+7 | |
| | | | | llvm-svn: 161788 | |||||
* | For non-Darwin platforms, we want to generate stack protectors only for | Bill Wendling | 2012-08-07 | 1 | -1/+10 | |
| | | | | | | | character arrays. This is in line with what GCC does. <rdar://problem/10529227> llvm-svn: 161446 | |||||
* | Enable stack protectors for all arrays, not just char arrays. rdar://5875909 | Bob Wilson | 2011-11-23 | 1 | -6/+1 | |
| | | | | | | Patch by Bill Wendling. llvm-svn: 145097 | |||||
* | land David Blaikie's patch to de-constify Type, with a few tweaks. | Chris Lattner | 2011-07-18 | 1 | -2/+2 | |
| | | | | llvm-svn: 135375 | |||||
* | Convert CallInst and InvokeInst APIs to use ArrayRef. | Jay Foad | 2011-07-15 | 1 | -1/+1 | |
| | | | | llvm-svn: 135265 | |||||
* | Inline check that's used only once. | Bill Wendling | 2011-03-29 | 1 | -2/+1 | |
| | | | | llvm-svn: 128465 | |||||
* | Rework the logic (and removing the bad check for an unreachable block) so that | Bill Wendling | 2011-03-29 | 1 | -8/+5 | |
| | | | | | | | the FailBB dominator is correctly calculated. Believe it or not, there isn't a functionality change here. llvm-svn: 128455 | |||||
* | Don't try to add stack protector logic to a dead basic block. It messes up | Bill Wendling | 2011-03-29 | 1 | -1/+2 | |
| | | | | | | dominator information. llvm-svn: 128452 | |||||
* | In some cases, the "fail BB dominator" may be null after the BB was split (and | Bill Wendling | 2011-03-28 | 1 | -1/+2 | |
| | | | | | | | becomes reachable when before it wasn't). Check to make sure that it's not null before trying to use it. llvm-svn: 128434 | |||||
* | Fix the GCC test suite issue exposed by r127477, which was caused by stack | Cameron Zwarich | 2011-03-11 | 1 | -3/+3 | |
| | | | | | | | protector insertion not working correctly with unreachable code. Since that revision was rolled out, this test doesn't actual fail before this fix. llvm-svn: 127497 | |||||
* | Make more passes preserve dominators (or state that they preserve dominators if | Cameron Zwarich | 2011-01-08 | 1 | -0/+18 | |
| | | | | | | | | | | they all ready do). This removes two dominator recomputations prior to isel, which is a 1% improvement in total llc time for 403.gcc. The only potentially suspect thing is making GCStrategy recompute dominators if it used a custom lowering strategy. llvm-svn: 123064 | |||||
* | Get rid of static constructors for pass registration. Instead, every pass ↵ | Owen Anderson | 2010-10-19 | 1 | -2/+6 | |
| | | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820 | |||||
* | Now with fewer extraneous semicolons! | Owen Anderson | 2010-10-07 | 1 | -1/+1 | |
| | | | | llvm-svn: 115996 | |||||
* | Reapply r110396, with fixes to appease the Linux buildbot gods. | Owen Anderson | 2010-08-06 | 1 | -2/+2 | |
| | | | | llvm-svn: 110460 | |||||
* | Revert r110396 to fix buildbots. | Owen Anderson | 2010-08-06 | 1 | -2/+2 | |
| | | | | llvm-svn: 110410 | |||||
* | Don't use PassInfo* as a type identifier for passes. Instead, use the ↵ | Owen Anderson | 2010-08-05 | 1 | -2/+2 | |
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396 | |||||
* | Fix batch of converting RegisterPass<> to INTIALIZE_PASS(). | Owen Anderson | 2010-07-21 | 1 | -2/+2 | |
| | | | | llvm-svn: 109045 | |||||
* | tighten up this code. | Chris Lattner | 2010-07-06 | 1 | -12/+7 | |
| | | | | llvm-svn: 107670 | |||||
* | Fix up -fstack-protector on linux to use the segment | Eric Christopher | 2010-07-06 | 1 | -2/+15 | |
| | | | | | | | | | registers. Split out testcases per architecture and os now. Patch from Nelson Elhage. llvm-svn: 107640 | |||||
* | Uniformize the names of type predicates: rather than having isFloatTy and | Duncan Sands | 2010-02-15 | 1 | -1/+1 | |
| | | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223 | |||||
* | Move remaining stuff to the isInteger predicate. | Benjamin Kramer | 2010-01-05 | 1 | -1/+1 | |
| | | | | llvm-svn: 92771 | |||||
* | Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces. | Nick Lewycky | 2009-10-25 | 1 | -1/+1 | |
| | | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042 | |||||
* | Neuter stack protectors by only checking character arrays. This is what GCC | Bill Wendling | 2009-10-23 | 1 | -1/+6 | |
| | | | | | | does. llvm-svn: 84916 | |||||
* | Push LLVMContexts through the IntegerType APIs. | Owen Anderson | 2009-08-13 | 1 | -4/+7 | |
| | | | | llvm-svn: 78948 | |||||
* | Revert yesterday's change by removing the LLVMContext parameter to ↵ | Owen Anderson | 2009-07-15 | 1 | -1/+1 | |
| | | | | | | AllocaInst and MallocInst. llvm-svn: 75863 | |||||
* | Move EVER MORE stuff over to LLVMContext. | Owen Anderson | 2009-07-14 | 1 | -1/+1 | |
| | | | | llvm-svn: 75703 | |||||
* | This started as a small change, I swear. Unfortunately, lots of things call ↵ | Owen Anderson | 2009-07-09 | 1 | -1/+1 | |
| | | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200 | |||||
* | Rename PaddedSize to AllocSize, in the hope that this | Duncan Sands | 2009-05-09 | 1 | -1/+1 | |
| | | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349 | |||||
* | When we split a basic block, there's a default branch to the newly created BB. | Bill Wendling | 2009-03-06 | 1 | -0/+3 | |
| | | | | | | Delete this default branch, because we're going to generate our own. llvm-svn: 66234 | |||||
* | Rename getABITypeSize to getTypePaddedSize, as | Duncan Sands | 2009-01-12 | 1 | -1/+1 | |
| | | | | | | suggested by Chris. llvm-svn: 62099 | |||||
* | Rename stackprotector_create intrinsic to stackprotector. | Bill Wendling | 2008-11-18 | 1 | -1/+1 | |
| | | | | llvm-svn: 59519 | |||||
* | Remove the stackprotector_check intrinsic. Use a volatile load instead. | Bill Wendling | 2008-11-18 | 1 | -6/+4 | |
| | | | | llvm-svn: 59504 | |||||
* | - Use "moveAfter" instead of "remove/insert" of a basic block. | Bill Wendling | 2008-11-18 | 1 | -103/+104 | |
| | | | | | | | | | - Use less indentation in coding. - Shorten description. - Update comments. - Move code around llvm-svn: 59496 | |||||
* | Implement stack protectors as function attributes: "ssp" and "sspreq". | Bill Wendling | 2008-11-13 | 1 | -14/+12 | |
| | | | | llvm-svn: 59202 | |||||
* | Small simplification. Use the iterator already present as the insertion point. | Bill Wendling | 2008-11-10 | 1 | -4/+3 | |
| | | | | llvm-svn: 59008 | |||||
* | - Make sure that we don't over-increment the iterator when going through the | Bill Wendling | 2008-11-10 | 1 | -7/+8 | |
| | | | | | | | basic blocks. - Minor code clean-up. llvm-svn: 59002 | |||||
* | - Modify the stack protector algorithm so that the stack slot is allocated in | Bill Wendling | 2008-11-07 | 1 | -31/+29 | |
| | | | | | | | | | LLVM IR code and not in the selection DAG ISel. This is a cleaner solution. - Fix the heuristic for determining if protectors are necessary. The previous one wasn't checking the proper type size. llvm-svn: 58824 | |||||
* | Remove unneeded header file. | Bill Wendling | 2008-11-06 | 1 | -1/+0 | |
| | | | | llvm-svn: 58823 | |||||
* | Don't build a vector of returns. Just modify the Function in the loop. | Bill Wendling | 2008-11-06 | 1 | -46/+49 | |
| | | | | llvm-svn: 58822 | |||||
* | The size limit is for individual arrays. So if any array has more than 8 bytes | Bill Wendling | 2008-11-06 | 1 | -5/+3 | |
| | | | | | | in it, then emit stack protectors. llvm-svn: 58819 | |||||
* | - Rename stackprotector_{prologue,epilogue} to stackprotector_{create,check}. | Bill Wendling | 2008-11-06 | 1 | -2/+2 | |
| | | | | | | | - Get rid of "HasStackProtector" in MachineFrameInfo. - Modify intrinsics to tell which are doing what with memory. llvm-svn: 58799 | |||||
* | Adjust the stack protector heuristic to care about only arrays or calls to | Bill Wendling | 2008-11-06 | 1 | -1/+9 | |
| | | | | | | "alloca". llvm-svn: 58792 | |||||
* | Implement the stack protector stack accesses via intrinsics: | Bill Wendling | 2008-11-06 | 1 | -9/+11 | |
| | | | | | | | | | | | | - stackprotector_prologue creates a stack object and stores the guard there. - stackprotector_epilogue reads the stack guard from the stack position created by stackprotector_prologue. - The PrologEpilogInserter was changed to make sure that the stack guard is first on the stack frame. llvm-svn: 58791 | |||||
* | Remove dead variable. | Bill Wendling | 2008-11-05 | 1 | -1/+0 | |
| | | | | llvm-svn: 58741 | |||||
* | Simplify the allocated size calculation. | Bill Wendling | 2008-11-05 | 1 | -3/+3 | |
| | | | | llvm-svn: 58740 | |||||
* | Fix comment | Bill Wendling | 2008-11-05 | 1 | -1/+2 | |
| | | | | llvm-svn: 58739 | |||||
* | Some code simplification. It now doesn't generate a prologue if the epilogue | Bill Wendling | 2008-11-05 | 1 | -61/+47 | |
| | | | | | | isn't going to be generated. llvm-svn: 58734 | |||||
* | Small simplification of the stack guard type. | Bill Wendling | 2008-11-04 | 1 | -4/+3 | |
| | | | | llvm-svn: 58728 | |||||
* | - Add a "getOrInsertGlobal" method to the Module class. This acts similarly to | Bill Wendling | 2008-11-04 | 1 | -14/+11 | |
| | | | | | | | | | | "getOrInsertFunction" in that it either adds a new declaration of the global and returns it, or returns the current one -- optionally casting it to the correct type. - Use the new getOrInsertGlobal in the stack protector code. - Use "splitBasicBlock" in the stack protector code. llvm-svn: 58727 |