Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
LLVM Essentials

You're reading from   LLVM Essentials Become familiar with the LLVM infrastructure and start using LLVM libraries to design a compiler

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781785280801
Length 166 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Suyog Sarda Suyog Sarda
Author Profile Icon Suyog Sarda
Suyog Sarda
Mayur Pandey Mayur Pandey
Author Profile Icon Mayur Pandey
Mayur Pandey
David Farago David Farago
Author Profile Icon David Farago
David Farago
John Criswell John Criswell
Author Profile Icon John Criswell
John Criswell
Arrow right icon
View More author details
Toc

Chapter 5. Advanced IR Block Transformations

In the previous chapter, we have gone through some of the optimizations, which were mainly at instruction level. In this chapter, we will look at optimizations on block level where we will be optimizing a block of code to a simpler form, which makes the code more effective. We will start by looking at how loops are represented in LLVM, use the concept of dominance and CFG to optimize loops. We will use Loop Simplification (LoopSimplify)and Loop Invariant Code Motion optimizations for loop processing. We will then see how a scalar value changes during program execution and how the result of this Scalar Evolution Optimization can be used in other optimizations. Then we will look into how LLVM represents its in build functions called as LLVM intrinsics. Finally, we will look into how LLVM deals with concepts of parallelism by understanding its approach towards vectorization.

In this chapter, we will look into the following topics:

  • Loop...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime