[PATCH] Add a "split-stack" function attribute.

Rafael Espíndola rafael.espindola at gmail.com
Tue Oct 29 07:50:36 PDT 2013


On 27 October 2013 20:24, Luqman Aden <me+llvm at luqman.ca> wrote:
>
>
> ================
> Comment at: lib/Target/X86/X86ISelLowering.cpp:10743
> @@ +10742,3 @@
> +  if (!Lower) {
> +    const TargetLowering &TLI = DAG.getTargetLoweringInfo();
> +    SDNode* Node = Op.getNode();
> ----------------
> Rafael Ávila de Espíndola wrote:
>> Can't you call ExpandDYNAMIC_STACKALLOC?
> Is that possible? I wasn't sure of how to and asking in #llvm didn't yield any answers.

Should be. What error do you get? You can refactor code into a helper
if needed, but please don't duplicate this much code.

> ================
> Comment at: include/llvm/CodeGen/CommandFlags.h:194
> @@ -193,3 +193,3 @@
>
> -cl::opt<bool>
> +cl::opt<llvm::SplitStacks::SplitStacksMode>
>  SegmentedStacks("segmented-stacks",
> ----------------
> Rafael Ávila de Espíndola wrote:
>> Why do you need this option? The point of having a positive attribute (split-stack)  attribute is that we can remove the existing codegen option.
> I guess you don't but I didn't want to break any existing stuff relying on setting it globally. I did change the default mode to be the per-fn attribute.

It is an internal backend option, so we can remove it. Clang will keep
working by adding the attribute, so we just need to put a not in the
release notes that the option was replaced with the attribute.

Cheers,
Rafael




More information about the llvm-commits mailing list