Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Reader: mark throw blocks as cold #284

Closed
AndyAyersMS opened this issue Mar 10, 2015 · 2 comments
Closed

Reader: mark throw blocks as cold #284

AndyAyersMS opened this issue Mar 10, 2015 · 2 comments

Comments

@AndyAyersMS
Copy link
Member

See TODO.

We know dynamically these blocks are rarely hit, so they should be moved out of line by block layout or put into a cold code section if we support code splitting.

@JosephTremoulet
Copy link
Contributor

Probably (hopefully?) this is a simple application of MDBuilder::createBranchWeights.

@mjsabby
Copy link
Contributor

mjsabby commented Mar 14, 2015

If the exception were to be implemented as a function, one could set addFnAttr(llvm::Attribute::Cold); which I think gives a low weight to the edges into blocks post-dominated by said function. Seems like createBranchWeights will do the job.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants