aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJan Voung <jvoung@chromium.org>2013-08-30 16:42:36 -0700
committerJan Voung <jvoung@chromium.org>2013-08-30 16:42:36 -0700
commit121830a16cdb2685b1ac49bb88407644c044ef30 (patch)
tree1f8189150dc41b8b29609206cc12246afded44cc /include
parent06bf94d7c3fd693b3c6e3b71178514e5ed59489a (diff)
Revert some ARM byval localmods since byval+varargs are not in stable pexes.
Localmods came from: https://codereview.chromium.org/10825082/, and earlier. (1) The original change was so that byval parameters always go on the stack. That part was added because the original ARM code was buggy, and did not actually make a copy of the value, modifying the caller's struct (ouch!). (2) Then came a localmod to make all arguments following a byval go on the stack and to make the var-args code aware of that. This is so that arguments stay in the correct order for var-args to pick up. For (1) there has been some work upstream to make it work better. In any case, clang with --target=armv7a-...-gnueabi only used byval in some limited cases -- when the size of the struct is > 64 bytes where the backend will know that part of it could be in regs, and the rest can be memcpy'ed to the stack. For le32, clang will still generate byval without satisfying the same ARM condition (only for structs bigger than 64 bytes), so it could be *very bad* if we didn't have the ABI simpification passes rewrite the byval and try to let the ARM backend do things with byval... TEST=the GCC torture tests: va-arg-4.c, and 20030914-2.c and the example in issue 2746 still pass. BUG=none, cleanup R=dschuff@chromium.org Review URL: https://codereview.chromium.org/23691009
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/CallingConvLower.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/include/llvm/CodeGen/CallingConvLower.h b/include/llvm/CodeGen/CallingConvLower.h
index 0b401f8f8e..fa9d60f0d4 100644
--- a/include/llvm/CodeGen/CallingConvLower.h
+++ b/include/llvm/CodeGen/CallingConvLower.h
@@ -213,7 +213,6 @@ private:
// InRegsParamsProceed - shows how many instances of ByValRegs was proceed
// during argument analysis.
unsigned InRegsParamsProceed;
- bool HasByValInRegPosition; // @LOCALMOD -- ARM only: see comment below.
protected:
ParmContext CallOrPrologue;
@@ -395,19 +394,6 @@ public:
ByValRegs.clear();
}
- // @LOCALMOD-BEGIN
- // We disabled the splitting of byval between registers and memory.
- // This separate flag indicates that a byval existed. We cannot reuse
- // isFirstByValRegValid() because that is already used by the broken
- // mechanism of splitting between stack and regs. We should check
- // again if this mechanism is still broken later, or try to fix that
- // mechanism.
- // NOTE: this is only for ARM, so should be refactored.
- bool hasByValInRegPosition() const { return HasByValInRegPosition; }
- void setHasByValInRegPosition() { HasByValInRegPosition = true; }
- void clearHasByValInRegPosition() { HasByValInRegPosition = false; }
- // @LOCALMOD-END
-
ParmContext getCallOrPrologue() const { return CallOrPrologue; }
private: