As Mom said, you can do either.

But if you have a good source of undiluted dichlor (= at least 60% available chlorine), it's often cheaper to use dichlor, since you get almost as much CYA from each dose of dichlor, as you do chlorine. Sams Club has PoolBrand dichlor for excellent prices, both as a 50# bucket and as a 24# box of 'shock'. (Last time I checked, Costco sold only 'diluted' dichlor.) The KemTek brand, sometimes sold by Home Depot, distributes undiluted dichlor, but you need to watch the label. Walmart sells only diluted dichlor.

If you don't have a local source, or if local prices are high, Amazon can be a good choice (and we get 5%, if you use the link here):
Kem-Tek Pool Concentrated Chlorinating Granules